bitsnbolts / laravel-cursor-paginate
Cursor based pagination for Laravel
Fund package maintenance!
bitsnbolts
Installs: 5 751
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.1
Requires (Dev)
- nunomaduro/collision: ^7.0
- orchestra/testbench: ^8.5
- phpunit/phpunit: ^10.0
- spatie/laravel-ray: ^1.9
- vimeo/psalm: ^5.12
README
This package adds Cursor Based Pagination to Laravel.
Installation
You can install the package via composer:
composer require bitsnbolts/laravel-cursor-paginate
You can publish the config file with:
php artisan vendor:publish --provider="Bitsnbolts\CursorPaginate\CursorPaginateServiceProvider" --tag="laravel-cursor-paginate-config"
This is the contents of the published config file:
return [
];
Usage
$paginator = App\Models\ExampleModel::cursorPaginateWithTotal(10, ['created_at' => 'desc', 'id' => 'desc']); $items = $paginator->items(); $nextUrl = $paginator->nextCursorUrl();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.