-
Notifications
You must be signed in to change notification settings - Fork 23
Configuration
DavidDuwaer edited this page Sep 25, 2017
·
7 revisions
Oops! Not much of this page has been written yet. However, our readme features a short version of this section. If the information is not elaborate enough, don't hesitate to create an issue notifying us about it!
- URL of the JSON-API
Coloquent has to translate its queries to HTTP URL strings, and in this process it has to choose between generating pagination parameters page[offset]=... and page[limit]=... (called offset-based pagination), or to generate page[]=... and page[size]=... (called page-based pagination). Bdefault, Coloquent translates to offset-based paginaion. This is determined by the static property Model.paginationStrategy, which can be overriden. I.e., to use page-based pagination, write
class YourModel extends Model
{
protected static paginationStrategy = PaginationStrategy.PageBased;
}To explicitly use offset-based pagination, write
class YourModel extends Model
{
protected static paginationStrategy = PaginationStrategy.OffsetBased;
}