eozden / paginator-route
Middleware for router {page} parameter to work with paginator
v1.0.2
2020-11-21 14:00 UTC
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.4
This package is auto-updated.
Last update: 2025-03-21 23:06:11 UTC
README
if your routes contains {page} route parameter, this middleware add this {page} parameter to your request instance.
Contents
Installation
Via Composer
$ composer require eozden/paginator-route
Or you can manually update your require block and run composer update
if you choose so:
{ "require": { "eozden/paginator-route": "^1.0" } }
Usage
In App/Http/Kernel.php, add the paginator-route middleware.
'api' => [ 'throttle:60,1', \Eozden\PaginatorRoute\Http\Middleware\PaginatorRoute::class ],
Examples
# In your route file contains this route. Route::get('/users/list/{page}', 'UserController@list'); # In your UserController file use as normal. public function list() { User::paginate(30); }
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email enes@emarka.com.tr instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.