nulltex/laravel-paginator is a Laravel package for laravel most flexible paginator.
It currently has 2 GitHub stars and 5 downloads on Packagist (latest version 1.0.0).
Install it with composer require nulltex/laravel-paginator.
Discover more Laravel packages by nulltex
or browse all Laravel packages to compare alternatives.
Last updated
You can install the package via composer:
composer require nulltex/laravel-paginator
You can use setRoute() method for set custom route name that will be used for generate pagination links.
Example:
$query = Model::query();
$paginator = $query->paginate()->setRoute(['route.name'])
By default paginator generates relative URL.
If you want to use absolute ones just call setRouteAbsoluteUrl()
$paginator->setRouteAbsoluteUrl(true)
Note: $pageName (default values is page) will be automatically applied to the route params.
If you want to change it just use setPageName().
For send some additional params into Route (excepting $pageName) pass them as array in the second item:
$query = Model::query();
$paginator = $query->paginate()->setRoute(['route.name', ['param' => 'value']])
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.