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

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

stepanenko3/laravel-pagination
==============================

Great pagination generator for Laravel

v1.0.4(1y ago)7137.3k↓14.9%2[1 PRs](https://github.com/stepanenko3/laravel-pagination/pulls)4MITPHPPHP ^8.0CI failing

Since Aug 24Pushed 1y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (3)Versions (6)Used By (4)

Laravel Pagination
==================

[](#laravel-pagination)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aee82aafa561606604787cc776afe4fbc882af733f10d77bd6fb34625b97b92f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746570616e656e6b6f332f6c61726176656c2d706167696e6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stepanenko3/laravel-pagination)[![Total Downloads](https://camo.githubusercontent.com/063be23c2c4abcd4b2f323ad26be8235ef384f9dffd87a2598083d358e27dd6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746570616e656e6b6f332f6c61726176656c2d706167696e6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stepanenko3/laravel-pagination)[![License](https://camo.githubusercontent.com/63f755134e471cfd40cdba4c2589cca4de2da377e666ac9a1ff5965369a0f896/68747470733a2f2f706f7365722e707567782e6f72672f73746570616e656e6b6f332f6c61726176656c2d706167696e6174696f6e2f6c6963656e7365)](https://packagist.org/packages/stepanenko3/laravel-pagination)

Description
-----------

[](#description)

Great pagination generator for Laravel

Examples
--------

[](#examples)

```
1, 2, 3, 4, 5, ..., 20

1, ..., 12, 13, 14, ..., 20

1, ..., 16, 17, 18, 19, 20

```

Requirements
------------

[](#requirements)

- `php: >=8.0`
- `laravel/framework: ^9.0`

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

[](#installation)

```
# Install the package
composer require stepanenko3/laravel-pagination
```

Usage
-----

[](#usage)

Create your own database builder in `app\Builders\BaseBuilder.php`

```
use Stepanenko3\LaravelPagination\Pagination;
use Illuminate\Database\Eloquent\Builder;

class BaseBuilder extends Builder
{
    public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
    {
        $page = $page ?: Pagination::resolveCurrentPage($pageName);
        $perPage = $perPage ?: $this->model->getPerPage();
        $results = ($total = $this->toBase()->getCountForPagination())
            ? $this->forPage($page, $perPage)->get($columns)
            : $this->model->newCollection();

        return new Pagination($results, $total, $perPage, $page, [
            'path' => Pagination::resolveCurrentPath(),
            'pageName' => $pageName,
        ]);
    }
}
```

Or use without database builder

```
new Pagination(
    $items,
    $total,
    $perPage,
    $currentPage,
);
```

Credits
-------

[](#credits)

- [Artem Stepanenko](https://github.com/stepanenko3)

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

[](#contributing)

Thank you for considering contributing to this package! Please create a pull request with your contributions with detailed explanation of the changes you are proposing.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance43

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~228 days

Total

5

Last Release

448d ago

### Community

Maintainers

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

---

Top Contributors

[![stepanenko3](https://avatars.githubusercontent.com/u/31134245?v=4)](https://github.com/stepanenko3 "stepanenko3 (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

laravelpaginationnavigationpaginatenav

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[nwidart/laravel-menus

Laravel Menu management

168180.3k10](/packages/nwidart-laravel-menus)[pingpong/menus

Laravel Menus

70194.4k13](/packages/pingpong-menus)[rinvex/laravel-menus

Rinvex Menus is a simple menu builder package for Laravel, that supports hierarchical structure, ordering, and styling with full flexibility using presenters for easy styling and custom structure of menu rendering.

294.0k20](/packages/rinvex-laravel-menus)

PHPackages © 2026

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