PHPackages                             popphp/pop-paginator - 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. popphp/pop-paginator

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

popphp/pop-paginator
====================

Pop Paginator Component for Pop PHP Framework

4.0.3(6mo ago)56.4k↓50%1BSD-3-ClausePHPPHP &gt;=8.3.0CI passing

Since Jul 21Pushed 6mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (24)Used By (1)

pop-paginator
=============

[](#pop-paginator)

[![Build Status](https://github.com/popphp/pop-paginator/workflows/phpunit/badge.svg)](https://github.com/popphp/pop-paginator/actions)[![Coverage Status](https://camo.githubusercontent.com/e7dabff4d88ab15c562c2b9ea0c22148273f120052bc9ad95ea257114c7693f5/687474703a2f2f63632e706f707068702e6f72672f636f7665726167652e7068703f636f6d703d706f702d706167696e61746f72)](http://cc.popphp.org/pop-paginator/)

[![Join the chat at https://discord.gg/TZjgT74U7E](https://camo.githubusercontent.com/acad7b0eeb78b78d08ffd2b85681ab243436388b5f86f8bcb956a69246e53739/68747470733a2f2f6d656469612e706f707068702e6f72672f696d672f646973636f72642e737667)](https://discord.gg/TZjgT74U7E)

- [Overview](#overview)
- [Install](#install)
- [Quickstart](#quickstart)
- [Page Range](#page-range)
- [Page Form](#page-form)
- [Options](#options)

Overview
--------

[](#overview)

`pop-paginator` is a component for handling pagination for large data sets. You can set multiple options to control the display of the pages and the links.

`pop-paginator` is a component of the [Pop PHP Framework](https://www.popphp.org/).

Install
-------

[](#install)

Install `pop-paginator` using Composer.

```
composer require popphp/pop-paginator

```

Or, require it in your composer.json file

```
"require": {
    "popphp/pop-paginator" : "^4.0.3"
}

```

[Top](#pop-paginator)

Quickstart
----------

[](#quickstart)

```
use Pop\Paginator\Paginator;

$paginator = Paginator::createRange(42); // Returns a Pop\Paginator\Range object
echo $paginator;
```

Which will produce this HTML:

```
1
2
3
4
5
```

And if you clicked on page 3, it would render:

```
1
2
3
4
5
```

[Top](#pop-paginator)

Page Range
----------

[](#page-range)

In the above example, a page range object renders a range of page links. With it, you can set a large number of pages and have it render "bookend" link before and after the range as the "previous" and "next" links. Pass the total number of items, the per page limit and the range limit:

```
use Pop\Paginator\Paginator;

$paginator = Paginator::createRange(4512, 10, 10); // Returns a Pop\Paginator\Range object
echo $paginator;
```

If we go to page 12, it would render:

```
&laquo;
&lsaquo;
11
12
13
14
15
16
17
18
19
20
&rsaquo;
&raquo;
```

As you can see, it renders the "bookends" to navigate to the next set of pages, the previous set, the beginning or end of the set.

[Top](#pop-paginator)

Page Form
---------

[](#page-form)

To have a cleaner way of displaying a large set of pages, you can use the form object, which renders a input form field.

```
use Pop\Paginator\Form;
$paginator = new Form(558); // Returns a Pop\Paginator\Form object
echo $paginator;
```

This will produce:

```
&laquo;
&lsaquo;

     of 56

&rsaquo;
&raquo;
```

So instead of a set a links in between the bookends, there is a form input field that will allow the user to input a specific page to jump to.

[Top](#pop-paginator)

Options
-------

[](#options)

You can set many options to tailor the paginator object's look and functionality:

- Number of items per page
- Range of the page sets
- Separator between the page links
- Classes for the on/off page links
- Bookend characters
    - start
    - previous
    - next
    - end

```
use Pop\Paginator\Form;
$paginator = new Form(558); // Returns a Pop\Paginator\Form object
$paginator->setBookends([
    'start'    => '&laquo;',
    'previous' => '&lsaquo;',
    'next'     => '&rsaquo;',
    'end'      => '&raquo;'
])
```

The `start` is the far left bookend that takes you back to the beginning. The `previous` is the left bookend that takes you to the previous page set. The `next` is the right bookend that takes you to the next page set. The `end` is the far right bookend that takes you all the way to the end.

[Top](#pop-paginator)

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance66

Regular maintenance activity

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 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 ~208 days

Recently: every ~269 days

Total

19

Last Release

201d ago

Major Versions

2.1.2 → 3.0.02017-03-08

v2.x-dev → 3.0.32019-01-10

3.1.1 → 4.0.02023-11-09

PHP version history (8 changes)2.0.0PHP &gt;=5.4.0

3.0.0PHP &gt;=5.6.0

3.0.3PHP &gt;=7.1.0

3.1.0PHP &gt;=7.3.0

3.1.1PHP &gt;=7.4.0

4.0.0PHP &gt;=8.1.0

4.0.1PHP &gt;=8.2.0

4.0.3PHP &gt;=8.3.0

### Community

Maintainers

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

---

Top Contributors

[![nicksagona](https://avatars.githubusercontent.com/u/898670?v=4)](https://github.com/nicksagona "nicksagona (40 commits)")

---

Tags

phppaginatorpaginationpoppop php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/popphp-pop-paginator/health.svg)

```
[![Health](https://phpackages.com/badges/popphp-pop-paginator/health.svg)](https://phpackages.com/packages/popphp-pop-paginator)
```

###  Alternatives

[stefangabos/zebra_pagination

A generic, Twitter Bootstrap compatible, PHP pagination library that automatically generates navigation links

11122.9k](/packages/stefangabos-zebra-pagination)[lampager/lampager-laravel

Rapid pagination for Laravel

7641.4k](/packages/lampager-lampager-laravel)[lampager/lampager

Rapid pagination without using OFFSET

3778.3k5](/packages/lampager-lampager)

PHPackages © 2026

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