I'd prefer to see the former because it lends itself to better user flexibility.
Example:
in Laravel I set User::paginate(25)
which always returns 25 records per page.
in the APIGee model the query can return 2 or 200 results per page, better for the savvy user.
You should try to use cursors in a RESTful API.
Take a look at Fractal They got a pretty nice pagination module.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community