Access array with php

  arrays, laravel, php

I can’t access this array. I tried everything. I need to get the values of [total:protected] and [lastPage:protected]. All of this is stored in $content.

I tried: $content["total:protected"], $content->total:protected()

laravelPaginationlar Object
(
    [total:protected] => 7
    [lastPage:protected] => 1
    [items:protected] => laravelHelperCollection Object
        (
            [items:protected] => Array
                (
                )

        )

    [perPage:protected] => 10
    [currentPage:protected] => 3
    [path:protected] => 
    [query:protected] => Array
        (
            [q] => 
        )

    [fragment:protected] => 
    [pageName:protected] => page
    [onEachSide] => 3
    [options:protected] => 
)

Source: Laravel

Leave a Reply