Skip to content

Commit 5fe1474

Browse files
authored
Update README.MD
1 parent 6972d7f commit 5fe1474

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.MD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,17 @@ class BlogRepository extends \Swis\JsonApi\Client\Repository
242242

243243
If this repository (pattern) doesn't fit your needs, you can create your own implementation using the [clients](#clients) provided by this package.
244244

245+
### Request parameters
246+
247+
All methods provided by the repository take extra parameters that will be appended to the url.
248+
This can be used, among other things, to add [include](https://jsonapi.org/format/#fetching-includes) and/or [pagination](https://jsonapi.org/format/#fetching-pagination) parameters:
249+
250+
``` php
251+
$repository = new BlogRepository();
252+
$repository->all(['include' => 'author', 'page' => ['limit' => 15, 'offset' => 0]]);
253+
```
254+
255+
245256
## ItemDocumentBuilder
246257

247258
The `Repository` and `DocumentClient` require `ItemDocumentInterface` instances when creating or updating resources.

0 commit comments

Comments
 (0)