A simple package to allow Laravels Paginator to get the page size and page number from the URL query parameters.
lioneagle/lioneagle-paginator is a Laravel package for a simple package to allow laravels paginator to get the page size and page number from the url query parameters..
It currently has 1 GitHub stars and 10.074 downloads on Packagist (latest version v2.0.0).
Install it with composer require lioneagle/lioneagle-paginator.
Discover more Laravel packages by lioneagle
or browse all Laravel packages to compare alternatives.
Last updated
You can install the package via composer:
composer require lioneagle/lioneagle-paginator
You can publish and run the migrations with:
You can publish the config file with:
php artisan vendor:publish --provider="Lioneagle\LioneaglePaginator\LioneaglePaginatorServiceProvider" --tag="lioneagle-config"
class UserController extends Controller
{
public function index()
{
$users = User::paginator();
return UserResource($users);
}
}
Now a request formatted as below (when using the default config) will return a paginated response as expected;
/users?page[number]=5&page[size]=50
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.