I'd prefer to see the former because it lends itself to better user flexibility.
in Laravel I set
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!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.