dev-master
9999999-devExtendedPaginator plugin for CakePHP
The Requires
The Development Requires
ExtendedPaginator plugin for CakePHP
Simple plugin to extend CakePHP 3 Paginator Component, with customized and additionnals queryParams., (*1)
You can install this plugin into your CakePHP application using composer., (*2)
The recommended way to install composer packages is:, (*3)
composer require irongomme/ExtendedPaginator
Then load it in your app:, (*4)
./bin/cake plugin load ExtendedPaginator
And configure it in your controller:, (*5)
public function initialize() { parent::initialize(); $this->loadComponent('Paginator', [ 'className' => 'ExtendedPaginator.ExtendedPaginator' ]); }
Ex: http://myapp/articles?limit=100&fields=title,content, (*6)
Will output:, (*7)
{ results: [ { id: 1, title: "Lorem Ipsum", content: "Lorem Ipsum Lorem Ipsum Lorem Ipsum ..." }, { ... } ] }
Ex: http://myapp/articles?limit=100&sort=title,-author_id, (*8)
Will sort by title ascending, then by author_id descending., (*9)
Ex: http://myapp/articles?limit=100&contain=authors[firstname,lastname] Ex: http://myapp/articles?limit=100&contain=authors,category[name], (*10)
If no fields are specified, all fields will be shown., (*11)
ExtendedPaginator plugin for CakePHP