, (*1)
Lightweight and easy to use pagination library, (*2)
Install
Via Composer, (*3)
``` bash
$ composer require masnathan/pagination, (*4)
## Usage
``` php
use MASNathan\Pagination\Pagination;
$pager = new Pagination($totalPages, $boundaries, $around, $currentPage);
foreach ($pager->getPages() as $pageLabel) {
echo sprintf('<a href="/list/page/%s">%s</a>', $pageLabel, $pageLabel);
}
You can also check the MASNathan\Pagination\Html\Pagination for a html builder, it's possible to extend it as well, check the Bootstrap class., (*5)
Change log
Please see CHANGELOG for more information what has changed recently., (*6)
Testing
bash
$ composer test, (*7)
Contributing
Please see CONTRIBUTING for details., (*8)
Security
If you discover any security related issues, please email andre.r.flip@gmail.com instead of using the issue tracker., (*9)
Credits
License
The MIT License (MIT). Please see License File for more information., (*10)