jinfakeji168/pagination

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

v1.1.1 2024-06-27 08:32 UTC

This package is auto-updated.

Last update: 2024-10-27 09:11:13 UTC


README

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

Installation

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

"phprookiehbb/pagination": "dev-master"

or run

composer require phprookiehbb/pagination:dev-master

Example

use Crasphb\Pagination;
$pagination = new Pagination($target,1,['style' => 1,'simple'=>false,'allCounts'=>true,'nowAllPage'=>true,'toPage'=>true]);
//数组的分页后的元素
$item = $pagination->getItem();
//分页样式的渲染
$page = $pagination->render();

Explanation

Show

simple模式

simple模式

style = 1,2,3

Image1 text

Image1 text

Image1 text

allCount,nowAllPage,toPage模式

Image1 text