bitsnbolts/laravel-cursor-paginate

Cursor based pagination for Laravel
6,922
Install
composer require bitsnbolts/laravel-cursor-paginate
Latest Version:6.0.0
PHP:^8.1 || ^8.2 || ^8.3 || ^8.4
Laravel:12
Older releases:8 – 11
License:MIT
Last Updated:Sep 11, 2025
Links: GitHub  ·  Packagist
Maintainer: thijsvdanker

Cursor based pagination for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

Related Packages

vanthao03596/laravel-cursor-paginate

Laravel Cursor Paginate for laravel 6,7

16,215 9
bitsnbolts/laravel-feed

Bitsnbolts Feed package for Laravel.

10,457 0
bitsnbolts/laravel-collection-macros

A set of useful Laravel collection macros

3,024 1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959

Version History

Version Released PHP Laravel License
6.0.0 ^8.1 || ^8.2 || ^8.3 || ^8.4 ^12.0 MIT
5.0.0 ^8.1 || ^8.2 || ^8.3 || ^8.4 ^11.0 MIT
4.0.0 ^8.1 ^10.0 MIT
3.0.0 ^7.4|^8.0 ^9.0 MIT
2.0.2 ^7.4|^8.0 ^8.0 MIT