PHP code example of jeffersonsimaogoncalves / cakephp-api-pagination
1. Go to this page and download the library: Download jeffersonsimaogoncalves/cakephp-api-pagination library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jeffersonsimaogoncalves / cakephp-api-pagination example snippets
php
Plugin::load('BryanCrowe/ApiPagination');
php
$this->loadComponent('BryanCrowe/ApiPagination.ApiPagination');
php
$this->set('articles', $this->paginate($this->Articles));
$this->set('_serialize', ['articles']);
php
$this->loadComponent('BryanCrowe/ApiPagination.ApiPagination', [
'key' => 'paging',
'aliases' => [
'page' => 'currentPage',
'current' => 'resultCount'
],
'visible' => [
'currentPage',
'resultCount',
'prevPage',
'nextPage'
]
]);