heseya/pagination

Heseya Pagination Middleware for Laravel
4,655
Install
composer require heseya/pagination
Latest Version:1.0.4
PHP:^8.0
Laravel:8 – 11
License:MIT
Last Updated:Mar 18, 2024
Links: GitHub  ·  Packagist
Maintainer: bvlinsky

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/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
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|^9.0|^10.0|^11.0 MIT
1.0.3 ^8.0 ^8.0|^9.0|^10.0 MIT
1.0.2 ^8.0 ^8.0|^9.0 MIT
1.0.1 ^8.0 ^8.0|^9.0 MIT
1.0.0 ^8.0 ^8.0|^9.0 MIT