PHPackages                             vanthao03596/laravel-cursor-paginate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vanthao03596/laravel-cursor-paginate

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vanthao03596/laravel-cursor-paginate
====================================

Laravel Cursor Paginate for laravel 6,7

1.0.6(4y ago)912.0k↓38.5%4MITPHPPHP ^7.3|^8.0

Since May 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vanthao03596/laravel-cursor-paginate)[ Packagist](https://packagist.org/packages/vanthao03596/laravel-cursor-paginate)[ Docs](https://github.com/vanthao03596/laravel-cursor-paginate)[ GitHub Sponsors](https://github.com/vanthao03596)[ RSS](/packages/vanthao03596-laravel-cursor-paginate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

Laravel Cursor Paginate for laravel 6,7
=======================================

[](#laravel-cursor-paginate-for-laravel-67)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f0025a8d4b3f217cc5765901020e196b09e1702772ac15de2df40c64a948231f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616e7468616f30333539362f6c61726176656c2d637572736f722d706167696e6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vanthao03596/laravel-cursor-paginate)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a07342b8c3c39f5a493fd1248bbf0e19be0ca1583060620f73e0376f512db74f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f76616e7468616f30333539362f6c61726176656c2d637572736f722d706167696e6174652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/vanthao03596/laravel-cursor-paginate/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/75eae0317bfe9e0edf650ac27d275f4e293ea961b35e61ca83f581d89bdb810b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f76616e7468616f30333539362f6c61726176656c2d637572736f722d706167696e6174652f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/vanthao03596/laravel-cursor-paginate/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/33addd5797c8a7d553e745cd61172897ab6eb4adbaa5b550924bbc4a730aae1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76616e7468616f30333539362f6c61726176656c2d637572736f722d706167696e6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vanthao03596/laravel-cursor-paginate)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require vanthao03596/laravel-cursor-paginate
```

Usage
-----

[](#usage)

Similar to `simplePaginate`, `cursorPaginate` displays "Next" and "Previous" links in your application's UI. You may use the `cursorPaginate` method like so:

```
$users = DB::table('users')->orderBy('id')->cursorPaginate(15);
```

Similarly, you may use the `cursorPaginate` method to cursor paginate Eloquent models:

```
$users = User::where('votes', '>', 100)->orderBy('id')->cursorPaginate(15);
```

When working with resources, you need to use trait `HasCursorPaginate` to your Resource class:

```
use Illuminate\Http\Resources\Json\ResourceCollection;
use Vanthao03596\LaravelCursorPaginate\HasCursorPaginate;

class YourCollectionResource extends ResourceCollection
{
    use HasCursorPaginate;

    public $collects = YourResource::class;
}
```

Cursor Paginator Instance Methods
---------------------------------

[](#cursor-paginator-instance-methods)

Each cursor paginator instance provides additional pagination information via the following methods:

MethodDescription`$paginator->count()`Get the number of items for the current page.`$paginator->cursor()`Get the current cursor instance.`$paginator->getOptions()`Get the paginator options.`$paginator->hasPages()`Determine if there are enough items to split into multiple pages.`$paginator->hasMorePages()`Determine if there are more items in the data store.`$paginator->getCursorName()`Get the query string variable used to store the cursor.`$paginator->items()`Get the items for the current page.`$paginator->nextCursor()`Get the cursor instance for the next set of items.`$paginator->nextPageUrl()`Get the URL for the next page.`$paginator->onFirstPage()`Determine if the paginator is on the first page.`$paginator->perPage()`The number of items to be shown per page.`$paginator->previousCursor()`Get the cursor instance for the previous set of items.`$paginator->previousPageUrl()`Get the URL for the previous page.`$paginator->setCursorName()`Set the query string variable used to store the cursor.`$paginator->url($cursor)`Get the URL for a given cursor instance.Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [phamthao](https://github.com/vanthao03596)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~22 days

Total

7

Last Release

1746d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34786441?v=4)[Pham Thao](/maintainers/vanthao03596)[@vanthao03596](https://github.com/vanthao03596)

---

Top Contributors

[![vanthao03596](https://avatars.githubusercontent.com/u/34786441?v=4)](https://github.com/vanthao03596 "vanthao03596 (40 commits)")

---

Tags

laravelvanthao03596laravel-cursor-paginate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vanthao03596-laravel-cursor-paginate/health.svg)

```
[![Health](https://phpackages.com/badges/vanthao03596-laravel-cursor-paginate/health.svg)](https://phpackages.com/packages/vanthao03596-laravel-cursor-paginate)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[glhd/special

1929.4k](/packages/glhd-special)[vanthao03596/laravel-hanhchinhvn

hành chính việt nam laravel

406.3k](/packages/vanthao03596-laravel-hanhchinhvn)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
