File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 1
- # cakephp-api-pagination
1
+ # CakePhp API Pagination
2
2
3
3
[ ![ Latest Version on Packagist] [ ico-version ]] [ link-packagist ]
4
4
[ ![ Software License] [ ico-license ]] ( LICENSE.md )
7
7
[ ![ Quality Score] [ ico-code-quality ]] [ link-code-quality ]
8
8
[ ![ Total Downloads] [ ico-downloads ]] [ link-downloads ]
9
9
10
- This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
11
- PSRs you support to avoid any confusion with users and contributors .
10
+ This is a simple component for CakePHP 3 which injects pagination information
11
+ from CakePHP's Paginator, into Json and Xml View responses .
12
12
13
13
## Install
14
14
@@ -18,11 +18,23 @@ 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.
22
+
23
+ ``` php
24
+ Plugin::load('BryanCrowe/ApiPagination');
25
+ ```
26
+
21
27
## Usage
22
28
29
+ Load the component in a controller's ` initialize() ` method:
30
+
31
+
23
32
``` php
24
- $skeleton = new BryanCrowe\Skeleton();
25
- echo $skeleton->echoPhrase('Hello, Bryan!');
33
+ public function initialize()
34
+ {
35
+ parent::initialize();
36
+ $this->loadComponent('BryanCrowe/ApiPagination');
37
+ }
26
38
```
27
39
28
40
## Change log
You can’t perform that action at this time.
0 commit comments