| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 39 | All time: 10,941 This week: 41 | ||||
| Version | License | PHP version | Categories | |||
| cakephp3-json-pagina 1.0 | The PHP License | 5 | PHP 5, Databases, Libraries, Design P..., T... |
| Description | Author | |||
This package can add pagination to listings generated by CakePHP. Innovation Award
|
composer require kield-01/cakephp3-json-pagination && composer dump-autoload -o
In Your AppController, You must add use JsonPaginationTrait to use the trait application-wide:
class AppController extends Controller
{
use JsonPaginationTrait;
}
Or You could add it only to the controller You want:
class UsersController extends Controller
{
use JsonPaginationTrait;
}
At first, You should load Your model, which You want to use with JsonPaginationTrait or to use autoloaded by the classname:
class UsersController extends Controller
{
use JsonPaginationTrait;
public function index()
{
/If You want to use custom alias, You should pass second argument/
return $this->j_paginate($this->Users->find(), $this->Users->getTable());
/Regular response with classic data alias/
return $this->j_paginate($this->Users->find());
}
}
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Doc. | Documentation | |||
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| cakephp3-json-pagina-2022-01-11.zip 14KB | |
| cakephp3-json-pagina-2022-01-11.tar.gz 14KB | |
| Install with Composer |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.