Skip to content

lipichang/page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published