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

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

irfantoor/pagination
====================

Creates normal or reversed pagination

0.2(5y ago)021MITPHPPHP &gt;=7.3

Since May 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/irfantoor/pagination)[ Packagist](https://packagist.org/packages/irfantoor/pagination)[ RSS](/packages/irfantoor-pagination/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Irfan's Pagination
==================

[](#irfans-pagination)

A simple pagination library, which can be used to create the pagination links at the bottom of a page.

Quick Start
-----------

[](#quick-start)

**example**:

```

            .pagination a {text-decoration: none}

            /* from bootstrap.css */
            .pagination {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            padding-left: 0;
            list-style: none;
            border-radius: 0.25rem;
            }

            .page-link {
            position: relative;
            display: block;
            padding: 0.5rem 0.75rem;
            margin-left: -1px;
            line-height: 1.25;
            color: #007bff;
            background-color: #fff;
            border: 1px solid #dee2e6;
            }

            .page-link:hover {
            color: #0056b3;
            text-decoration: none;
            background-color: #e9ecef;
            border-color: #dee2e6;
            }

            .page-link:focus {
            z-index: 2;
            outline: 0;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            }

            .page-link:not(:disabled):not(.disabled) {
            cursor: pointer;
            }

            .page-item:first-child .page-link {
            margin-left: 0;
            border-top-left-radius: 0.25rem;
            border-bottom-left-radius: 0.25rem;
            }

            .page-item:last-child .page-link {
            border-top-right-radius: 0.25rem;
            border-bottom-right-radius: 0.25rem;
            }

            .page-item.active .page-link {
            z-index: 1;
            color: #fff;
            background-color: #007bff;
            border-color: #007bff;
            }

            .page-item.disabled .page-link {
            color: #6c757d;
            pointer-events: none;
            cursor: auto;
            background-color: #fff;
            border-color: #dee2e6;
            }

```

Construct Pagination
--------------------

[](#construct-pagination)

**method**: new Pagination($options = \[\])

**parameters**:

- array $options Array of pagination options

**example**:

```
