specialtactics / laravel-api-boilerplate

Laravel API Boilerplate | Quickly build quality API products!
MIT License
490 stars 94 forks source link

getAll() pagenation #56

Closed kfoon closed 2 years ago

kfoon commented 3 years ago

getAll() how to set the number of page and also get the next page

specialtactics commented 3 years ago

There's no way to get the number of pages. This is just to do with how pagination works - it's a constrain of speed (ie. not every database can efficiently count rows, so getting number of pages is an inefficient operation).

Going to the next page is as per normal in laravel - ie. page query param.