$query->page()
Automatically adds pagination to a query
$query->page(int $page, int $limit): object
Parameters
Name | Type | Default | Description |
---|---|---|---|
$pagerequired | int |
no default value | |
$limitrequired | int |
no default value | The number of rows, which should be returned for each page |
Return type
object
Collection iterator with attached pagination object
This method modifies the existing $query
object it is applied to and returns it again.