Support for different pagination strategies
Closed this issue · 1 comments
X-Coder264 commented
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.
dbrekalo commented
@X-Coder264 added in version 0.56.0. Documented here https://trikoder.github.io/trim/core-concepts-and-api.html#api-pagination-strategies