PHPackages                             laasti/pagination - 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. laasti/pagination

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

laasti/pagination
=================

A small pagination library that produces data objects instead of HTML.

v0.2.2(10y ago)0252[1 PRs](https://github.com/laasti/pagination/pulls)MITPHPPHP &gt;=5.4.0

Since Aug 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/laasti/pagination)[ Packagist](https://packagist.org/packages/laasti/pagination)[ RSS](/packages/laasti-pagination/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Laasti/pagination
=================

[](#laastipagination)

A small library to generate pagination.

Installation
------------

[](#installation)

```
composer require laasti/pagination

```

Usage
-----

[](#usage)

```
$pagination = new Pagination($currentPage, $total, $perPage, $baseUrl, $neighbours);

echo 'First';
echo 'Previous';
foreach ($pagination as $page) {
    if ($page->isActive()) {
        echo ''.$page->number().'';
    } else {
        echo ''.$page->number().'';
    }
}
echo 'Next';
echo 'Last';
```

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

History
-------

[](#history)

See CHANGELOG.md for more information.

Credits
-------

[](#credits)

Author: Sonia Marquette (@nebulousGirl)

License
-------

[](#license)

Released under the MIT License. See LICENSE.txt file.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~27 days

Total

6

Last Release

3776d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48bb7fdba3e642d3dc668b9ff03ff949b9043f58096f3c85c13de508b53e7d68?d=identicon)[nebulousGirl](/maintainers/nebulousGirl)

---

Top Contributors

[![nebulousGirl](https://avatars.githubusercontent.com/u/1899256?v=4)](https://github.com/nebulousGirl "nebulousGirl (7 commits)")

### Embed Badge

![Health badge](/badges/laasti-pagination/health.svg)

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

###  Alternatives

[xobotyi/rsync

rsync wrapper library for php

9732.3k1](/packages/xobotyi-rsync)

PHPackages © 2026

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