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

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

adamb/pagination
================

Creates bootstrap themed pagination buttons

1.1.6(5y ago)22.2k22MITPHP

Since Oct 23Pushed 5y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (2)

[![Build Status](https://camo.githubusercontent.com/1df43e2ae5dbb917c7bcb396b96bfd79d61d7fa20f5663e69247e8981ce11c4d/68747470733a2f2f6170692e7472617669732d63692e6f72672f4164616d42373538362f706167696e6174696f6e2e706e67)](https://api.travis-ci.org/AdamB7586/pagination)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/fd2e3e930aa77c19f1b033b5394cf6cc82b24796c370cdbaac0bb66b9d3b10c1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4164616d42373538362f706167696e6174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f733d33373538653231643237396265636466383437613535376135366133656431366466656339643564)](https://scrutinizer-ci.com/g/AdamB7586/pagination/)[![Scrutinizer Coverage](https://camo.githubusercontent.com/1b895b04313aecaac3decb56dd643eeab5ca884deb6a412b429cd54ed0b6b79c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4164616d42373538362f706167696e6174696f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/AdamB7586/pagination/)[![Minimum PHP Version](https://camo.githubusercontent.com/a61767cd5fad846f5fe320af243fc4d50528ac3f32372bca131f3f5589b46d77/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3838393242462e7376673f7374796c653d666c61742d636972636c65)](https://php.net/)

Pagination
==========

[](#pagination)

Create a HTML pagination element using PHP. Compatible with Bootstrap and easily customisable classes.

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

[](#installation)

Installation is available via [Composer/Packagist](https://packagist.org/packages/adamb/pagination), you can add the following line to your `composer.json` file:

```
"adamb/pagination": "^1.0"
```

or

```
composer require adamb/pagination
```

License
-------

[](#license)

This software is distributed under the [MIT](https://github.com/AdamB7586/pagination/blob/master/LICENSE) license. Please read LICENSE for information on the software availability and distribution.

Features
--------

[](#features)

- Creates a pagination HTML element
- Compatible with Bootstrap 3/4
- Change the class names assigned to the elements
- Easily change maximum number of links show
- If only 1 page exists no pager will be displayed

Usage
-----

[](#usage)

### 1. Creating the pagination HTML

[](#1-creating-the-pagination-html)

#### PHP Code

[](#php-code)

```
