8
8
[ ![ Total Downloads] [ ico-downloads ]] [ link-downloads ]
9
9
10
10
This is a simple component for CakePHP 3 which injects pagination information
11
- from CakePHP's Paginator, into Json and Xml View responses.
11
+ from CakePHP's Paginator into serialized JsonView and XmlView responses.
12
12
13
13
## Install
14
14
@@ -18,7 +18,7 @@ Via Composer
18
18
$ composer require bcrowe/cakephp-api-pagination
19
19
```
20
20
21
- Then make sure to load the plugin in your application's ` bootstrap.php ` file:
21
+ Load the plugin in your application's ` bootstrap.php ` file:
22
22
23
23
``` php
24
24
Plugin::load('BryanCrowe/ApiPagination');
@@ -28,7 +28,6 @@ Plugin::load('BryanCrowe/ApiPagination');
28
28
29
29
Load the component in a controller's ` initialize() ` method:
30
30
31
-
32
31
``` php
33
32
public function initialize()
34
33
{
@@ -37,8 +36,8 @@ public function initialize()
37
36
}
38
37
```
39
38
40
- Your responses will now contain the pagination information, and will look
41
- something like:
39
+ Your JsonView and XmlView responses will now contain the pagination information,
40
+ and will look something like this :
42
41
43
42
``` json
44
43
{
@@ -106,8 +105,8 @@ This configuration would yield:
106
105
}
107
106
```
108
107
109
- ** Note:** Whenever setting key visibily , use the aliased name if you've given it
110
- one.
108
+ ** Note:** Whenever setting keys' visbility , use the aliased name if you've given
109
+ it one.
111
110
112
111
## Change log
113
112
0 commit comments