brenoroosevelt/cakephp-pagination-cache
Composer 安装命令:
composer require brenoroosevelt/cakephp-pagination-cache
包简介
Pagination Cache plugin for CakePHP 3.x
README 文档
README
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require brenoroosevelt/cakephp-pagination-cache
Load the plugin
Add following to your config/bootstrap.php
Plugin::load('BRPaginationCache');
Usage
Controller class
public function index() { // load component with setup param $this->loadComponent('BRPaginationCache.PaginationCache', [ 'session' => 'posts_pagination' ]); // restore pagination from session $this->PaginationCache->restore(); // pagination $this->set('posts', $this->paginate($this->Posts)); // save pagination from session $this->PaginationCache->save(); }
Persisting pagination params (session)
All params are persisted using sessions. Make sure to load the Session component.
统计信息
- 总下载量: 94
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-25