金科168/pagination

适用于所有程序的数组分页,内置分页样式,可自定义样式,稍作修改即可用于各种情况下的数组分页

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

This package is auto-updated.

Last update: 2024-09-27 09:01:44 UTC


README

数组分页,可自定义样式,内置3种样式,稍作修改即可用于各种情况下的数组分页

安装

Pagination在Packagist上可用。只需将此行添加到您的composer.json文件中

"phprookiehbb/pagination": "dev-master"

或运行

composer require phprookiehbb/pagination:dev-master

示例

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

说明

显示

简单模式

simple模式

style = 1,2,3

Image1 text

Image1 text

Image1 text

allCount,nowAllPage,toPage模式

Image1 text