LaravelPackages.net
Acme Inc.
Toggle sidebar
lipichang/pagination

分页,提供分页总数,分页参数自动分割,有默认样式可以参考也可以自己定义

46
0
About lipichang/pagination

lipichang/pagination is a Laravel package for 分页,提供分页总数,分页参数自动分割,有默认样式可以参考也可以自己定义. It currently has 0 GitHub stars and 46 downloads on Packagist. Install it with composer require lipichang/pagination. Discover more Laravel packages by lipichang or browse all Laravel packages to compare alternatives.

Last updated

pagination

数组分页,可定制样式,内置3种样式,稍微修改一下可使用与所有的情形下的数组分页

Installation

Pagination is available on Packagist.Just add this line to your composer.json file:

"lipichang/pagination": "dev-master"

or run

composer require lipichang/pagination:dev-master

Example

use Lipichang\Pagination;
$pagination = new Pagination($totalPage,['style' => 1,'is_style' => true,'is_follow' => true,'simple'=>false,'allCounts'=>true,'nowAllPage'=>true,'toPage'=>true],['title' => 'shoes']);

//分页样式的渲染
$page = $pagination->render();

Explanation

| 参数 | 类型 | 说明 | | ------------ | ------------ |------------ | | totalPage | int | 总页数 | | style | int | 分页样式,可选值1,2,3 | | is_style | boolean | 是否使用默认样式true是 false否 默认true | | is_follow | boolean | 是否允许搜索引擎跟踪 true 是 false 否 默认true | | simple | boolean | true:简单的分页样式,false:复杂的分页样式 | | allCounts | boolean | 显示总页数 | | nowAllPage | boolean | 显示现在的页码 | | toPage | boolean | 跳转页码的功能 | | query | array | 分页其他查询参数 |

Show

simple模式

simple模式

style = 1,2,3

Image1 text

Image1 text

Image1 text

allCount,nowAllPage,toPage模式

Image1 text

Comments