tsbgroup/simply-paginator
Composer 安装命令:
composer require tsbgroup/simply-paginator
包简介
Paginator for your projects
README 文档
README
Installation:
composer require tsbgroup/simply-paginator
Use
use SimplyPaginator\Paginator
$totalItems = 50; //Total count elements for which will be build pagination
$perPage = 10; //Count elements to showing on each page
$currentPage = 1; //Number of current page
$route = '/?page='; //Part of url, which responsible for get elements for this page
$Paginator = new Paginator($totalItems, $perPage, $currentPage, $route);
//render paginate block
$Paginator->render();
/**
Return html block like this:
<ul>
<li class="active">1</li>
<li><a href="/?page=2">2</a></li>
<li><a href="/?page=3">3</a></li>
<li><a href="/?page=4">4</a></li>
<li><a href="/?page=5">5</a></li>
</ul>
*/
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-03