Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum | Blog (1) | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 38 | All time: 10,885 This week: 129 |
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());
}
}
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
Readme.md | Doc. | Documentation |
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.