Skip to content

Commit 0f5362e

Browse files
committed
wip
1 parent f1cf43f commit 0f5362e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/docs/3.0/filtering/filtering.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,22 @@ This means that we could use `posts` query for eager loading posts:
102102
```http request
103103
GET: /restify-api/related?related=user
104104
```
105+
106+
## Pagination
107+
108+
Laravel Restify has returns `index` items paginates. The default `perPage` is 15.
109+
110+
You can modify that by modifying `$defaultPerPage` property:
111+
112+
```php
113+
class PostRepository extends Repository
114+
{
115+
public static $defaultPerPage = 30;
116+
}
117+
```
118+
119+
The per page could be changed via query param `perPage`:
120+
121+
```http request
122+
`/restify-api/posts?perPage=30
123+
```

0 commit comments

Comments
 (0)