heseya/pagination
Heseya Pagination Middleware
Middleware that automatically sets pagination for all endpoints.
How it's work?
You add middleware in App\Http\Kernel
protected $middleware = [
...
Heseya\Pagination\Http\Middleware\Pagination::class,
];
or to specific route in router
Route::get(...)->middleware(Pagination::class);
Now when you send parameter limit
/products?limit=50
you can use pagination.per_page config key to set pagination limit
public function index()
{
return Product::paginate(Config::get('pagination.per_page'));
}
Installation
composer require heseya/laravel-pagination
php artisan vendor:publish --tag=pagination
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
648,266,899
9,701
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
423,477,751
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
403,217,078
4,664
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.4 | ^8.0 | ^8.0| | MIT | |
| 1.0.3 | ^8.0 | ^8.0| | MIT | |
| 1.0.2 | ^8.0 | ^8.0| | MIT | |
| 1.0.1 | ^8.0 | ^8.0| | MIT | |
| 1.0.0 | ^8.0 | ^8.0| | MIT |