Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Cursor Paginator Laravel Package

amrnn/laravel-cursor-paginator

Cursor-based pagination for Laravel. amrnn/laravel-cursor-paginator provides a paginator that uses cursors instead of offsets, useful for APIs and large datasets where stable, efficient paging matters. A small, focused package for Eloquent queries.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API pagination contract design. Choosing between page-number pagination (?page=3, arbitrary jumps, needs a total count) and cursor pagination (?cursor=..., stable "next page" only). This is a hard-to-reverse public API decision for mobile clients and integrations, so it belongs in the design review, not in a sprint ticket.
  • Performance triage for large-offset lists. Deep OFFSET scans are a common cause of slow feeds, activity streams, admin tables, exports, and notification lists. Cursor pagination removes the offset scan and gives stable results when rows are inserted concurrently — useful evidence when deciding whether a slow endpoint needs an index, a query rewrite, or a pagination redesign.
  • Build vs. buy vs. use-the-framework. The central decision this package informs. It is a third-party implementation of a capability Laravel now ships natively (cursorPaginate(), Laravel 8+). The rational product decision is almost always "use the framework primitive" — zero dependency, zero license review, zero vendor risk, same performance characteristics.
  • Roadmap de-prioritization. Given the package is archived and has ~19 stars, any roadmap item that depends on it should be re-scoped to "implement cursor pagination using the framework" rather than "integrate a library." This is a cheap decision to make now and an expensive one to unwind after adoption.
  • Niche use cases worth a spike, not a commitment. Possible gaps versus the native implementation — e.g. ordering by non-unique or multiple columns, custom cursor encoding, or support for Laravel versions below 8. Treat these as a timeboxed technical spike, not a product bet.

When to Consider This Package

Adopt only if all of these hold:

  1. You are pinned to Laravel < 8 and cannot upgrade on a reasonable timeline (native cursorPaginate() is unavailable).
  2. You have a demonstrated performance problem with deep offset pagination that indexing and query tuning cannot fix.
  3. Your team has reviewed the source (it is small, MIT-licensed) and is willing to vendor/fork it, because there will be no upstream fixes.

Look elsewhere — or don't buy at all — when:

  • You are on Laravel 8+. Use cursorPaginate(). This is the default answer and should be the recommendation in the majority of cases.
  • You need maintained dependencies. The repo is archived: no security patches, no PHP/Laravel compatibility work, no issue triage. With 19 stars the effective user base is tiny, so production battle-testing and community support are near zero. Expect supply-chain and audit friction.
  • You need page numbers, "jump to page," or exact total counts. That is a limitation of cursor pagination generally, not of this package; offset pagination or a hybrid is the right call.
  • Your sort keys are unstable or non-unique and you haven't validated that cursor semantics behave correctly for your data — a correctness risk that surfaces as duplicated or skipped rows in production, not in tests.
  • You need a long-term supported dependency for a core flow. Prefer in-house keyset pagination (a small, well-understood query helper) over an archived package.

How to Pitch It (Stakeholders)

One line: A small, archived library for cursor pagination in Laravel — useful as a reference implementation, but superseded by a built-in framework feature, so we should adopt the pattern, not the package.

For executives: This does not move a business metric; it is an infrastructure tactic that protects page-load performance as data grows. The commercially relevant point is risk: taking on an unmaintained dependency creates future migration and security-review cost for zero differentiated value. Recommendation: no new dependency; use the framework's built-in pagination, which costs nothing and carries no vendor risk.

For engineering: Cursor pagination is the right tool for infinite-scroll feeds and large tables — cheaper than deep OFFSET and stable under concurrent writes. This package implemented that before Laravel did; Laravel 8+ now provides it natively. Unless we're stuck on an older framework version or need ordering behavior the native implementation lacks, use cursorPaginate() and skip the dependency. If we do adopt it, plan to fork and own it.

Verdict: Not recommended for adoption. Use it as a design reference and a checklist of edge cases (multi-column ordering, cursor encoding, non-unique sort keys) when implementing cursor pagination on the framework primitive.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel