PHPackages                             zyan/page - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zyan/page

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zyan/page
=========

通用分页器

1.0.0(5y ago)014.4kMITPHPPHP &gt;=7.3

Since Apr 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/aa24615/page)[ Packagist](https://packagist.org/packages/zyan/page)[ RSS](/packages/zyan-page/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

zyan/page
=========

[](#zyanpage)

简洁好用的php通用分页

要求
--

[](#要求)

1. php &gt;= 7.3
2. Composer

安装
--

[](#安装)

```
composer require zyan/page -vvv
```

快速上手
----

[](#快速上手)

```
use Zyan\Page\Page;

$config = [
    'total_rows' => 1000, //总条数
    'url_rule' => '/list/?.html', //url规则 ? 代替分页数
    'now_page' => 50, //当前页
    'list_rows' => 10, //一页显示多少条
];

$page = Page($config);
```

输出html
------

[](#输出html)

```
echo $page->show();
```

```

    第一页
    上一页
    47
    48
    49
    50
    51
    52
    53
    下一页
    最后一页

```

自定义名称
-----

[](#自定义名称)

```
$config = [
    'first_page_name' => '', //下一页
    'last_page_name' => '>>', //最后一页
    //...
];

$page = Page($config);
```

参与贡献
----

[](#参与贡献)

1. fork 当前库到你的名下
2. 在你的本地修改完成审阅过后提交到你的仓库
3. 提交 PR 并描述你的修改，等待合并

License
-------

[](#license)

[MIT license](https://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1858d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbcdf7ec634eb735375fa4f6046f91646934f9eb07456f4b4dcbdec545c6435b?d=identicon)[aa24615](/maintainers/aa24615)

---

Top Contributors

[![aa24615](https://avatars.githubusercontent.com/u/33275679?v=4)](https://github.com/aa24615 "aa24615 (1 commits)")

---

Tags

phpdiy

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/zyan-page/health.svg)

```
[![Health](https://phpackages.com/badges/zyan-page/health.svg)](https://phpackages.com/packages/zyan-page)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
