PaginatedResourceResponse
class PaginatedResourceResponse extends ResourceResponse (View source)
Properties
mixed | $resource | The underlying resource. |
from ResourceResponse |
Methods
Response
array
wrap(Collection|array $data, array $with = [], array $additional = [])
Wrap the given data if necessary.
from
ResourceResponse
bool
haveDefaultWrapperAndDataIsUnwrapped(array $data)
Determine if we have a default wrapper and the given data is unwrapped.
from
ResourceResponse
bool
haveAdditionalInformationAndDataIsUnwrapped(array $data, array $with, array $additional)
Determine if "with" data has been added and our data is unwrapped.
from
ResourceResponse
array
array
paginationLinks(array $paginated)
Get the pagination links for the response.
array
meta(array $paginated)
Gather the meta data for the response.
Details
protected array
wrap(Collection|array $data, array $with = [], array $additional = [])
Wrap the given data if necessary.
protected bool
haveDefaultWrapperAndDataIsUnwrapped(array $data)
Determine if we have a default wrapper and the given data is unwrapped.
protected bool
haveAdditionalInformationAndDataIsUnwrapped(array $data, array $with, array $additional)
Determine if "with" data has been added and our data is unwrapped.
protected array
paginationInformation(Request $request)
Add the pagination information to the response.