trikoder/trim

Support for different pagination strategies

Closed this issue · 1 comments

Currently Trim supports only the offset strategy, e.g.

?page[offset]=0&page[limit]=15

We'd like to have an option to switch pagination strategies, to be more precise to have the option of using the page-based strategy, e.g.

?page[number]=1&page[size]=15

This pagination strategy is used by default by the Laravel JSON API package -> https://laravel-json-api.readthedocs.io/en/latest/fetching/pagination/#page-based-pagination

This package also supports the cursor based strategy, but as Trim doesn't have an infinite scroll feature this pagination strategy isn't needed at the moment.