tiagomatosweb's avatar

Pagination json structure

Hi all, I'm confusing about how should be the real pagination json structure. In the docs, it shows in two different ways. Please have a look on https://laravel.com/docs/5.6/pagination#converting-results-to-json and https://laravel.com/docs/5.6/eloquent-resources#pagination.

Is it a mistake or is there a way to set pagination with links and meta keys?

Cheers

0 likes
1 reply
tiagomatosweb's avatar
tiagomatosweb
OP
Best Answer
Level 3

Never mind, I just figure out. It depends on whether the response is a model or collection, then the pagination will be treated differently.

Cheers.

1 like

Please or to participate in this conversation.