We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af71379 commit c9b641fCopy full SHA for c9b641f
README.md
@@ -34,6 +34,17 @@ Then, load `ApiPaginationComponent`:
34
$this->loadComponent('BryanCrowe/ApiPagination.ApiPagination');
35
```
36
37
+Then, go ahead and set your paginated view variable like so:
38
+
39
+``` php
40
+$this->set('articles', $this->paginate($this->Articles));
41
+$this->set('_serialize', ['articles']);
42
+```
43
44
+**Note:** It is important that your `_serialize` variable is an array, e.g.
45
+`['articles']`, so that your pagination information can be set under its own
46
+pagination key.
47
48
Your JsonView and XmlView responses will now contain the pagination information,
49
and will look something like this:
50
0 commit comments