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

Pagination Laravel Package

mrshanebarron/pagination

A Laravel pagination package that provides helpers for creating, rendering, and customizing paginated result sets and navigation links, simplifying multi-page data display in Blade templates and API responses.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for a commodity capability. Pagination is not a differentiator — Laravel already ships paginate(), simplePaginate(), cursor pagination, Blade link rendering, and paginated JSON resource collections. The real decision this package forces is not "which paginator" but "do we accept a dependency to save roughly 50–150 lines of presentation-layer glue." Default answer should be no; the package is only relevant if it demonstrably standardizes a UI pattern we keep re-implementing across products.
  • Cross-surface consistency (web + API). The stated value — Blade-ready links plus structured JSON metadata from the same pagination call — maps to a real recurring problem: mobile and web clients drifting on meta/links shape. If we adopt, adopt it as the single source of pagination envelope shape, documented in our API style guide, rather than letting each team hand-roll responses.
  • Roadmap: pagination UX as a platform concern. If we are planning a design-system pass (table density, page-size selectors, "load more" on list views, deep-linkable page state), a package like this is a candidate for the presentation layer only. It should not be allowed to own query semantics, so a future switch to cursor pagination for large tables stays an internal change.
  • Use cases to evaluate against: admin/back-office list screens with page-size controls; public search results needing SEO-friendly ?page= links; partner-facing APIs where consistent meta.total/meta.last_page matters for their client SDKs; internal report tables that will exceed offset-pagination limits.
  • Vendor-risk decision. 0 stars, 0 dependents, a single maintainer, and a config-file rename (sb- prefix) shipped in v1.0.1 — a patch release — is a signal about interface stability discipline. That does not make the code bad, but it means we should treat it as "internal snippet we happen to install," not "supported third-party component." A PM decision here is really: do we accept a bus-factor-1 dependency in the critical rendering path of every list screen? For most orgs the answer is to vendor the pattern and keep the framework's paginator.
  • Documentation signal for planning. The available docs are largely generic Laravel package guidance (publish config, config:clear, DI over facades) rather than pagination-specific usage. Estimate onboarding as an unquantified spike, not a known cost — do not put this on a sprint without a timeboxed evaluation.

When to Consider This Package

Consider it when:

  • The application is small-to-mid Laravel, server-rendered, and the team wants page-size configuration and Blade links with near-zero custom view code.
  • You have a specific inconsistency to fix (e.g., three services emitting three different pagination JSON shapes) and this package's envelope matches what you want — verify the actual output shape against a real endpoint before committing.
  • You can wrap it behind an internal interface (e.g. App\Support\Pagination\Paginator) in under a day, so that removing it later is a one-file change.
  • You are comfortable vendoring: the package is small enough that copying it into app/ and taking ownership is viable, which neutralizes most supply-chain concerns.

Look elsewhere when:

  • You are on stock Laravel and only need standard pagination. Use the framework: Model::paginate(), ->withQueryString(), {{ $items->links() }}, and ResourceCollection for API meta. Zero dependency, documented, and every Laravel developer already knows it. This covers the majority of cases.
  • You need filtering/sorting alongside pagination. Reach for spatie/laravel-query-builder (maintained, widely used) or an explicit query-object pattern — not a presentation package.
  • Your tables will exceed deep-offset limits (large datasets, high page numbers). Offset pagination degrades; you want cursor pagination, which the framework provides natively. Confirm whether this package supports cursors before assuming it does.
  • You need a supported dependency with a security-response commitment. Single maintainer, 0 dependents, and no visible release cadence beyond one patch is not a vendor you can put in a compliance review. Check the license and confirm the maintainer is reachable before it lands in a client deliverable.
  • The config rename concerns you. The sb- prefix change in a patch release implies the config contract was still moving at v1.0.1. If your deployment relies on config:cache artifacts and multi-environment overrides, budget for the documented failure mode — a silent fallback to defaults when config/sb-*.php is absent.

Gate before adoption (one-day spike, PM-owned acceptance criteria): confirm the package actually delegates to Laravel's paginator rather than reimplementing it; confirm the JSON envelope matches your API contract exactly; confirm behavior under config:cache; confirm removal cost is trivial.

How to Pitch It (Stakeholders)

To executives: This is a small, single-maintainer Laravel UI package that standardizes how paginated lists look and how pagination metadata is returned to web and mobile clients. It solves a cosmetic-and-consistency problem, not a capability gap — Laravel already provides the underlying pagination. Cost is negligible; risk is the real consideration: no community adoption, one maintainer, and a breaking config rename in a patch release. Recommendation: do not add it as a production dependency today. Instead, use it as a reference for a short internal pagination standard, or vendor it and take ownership. This keeps our list screens consistent without putting a critical rendering path behind an unmaintained package. Revisit only if our needs are genuinely unmet by framework defaults.

To engineering: Evaluate as a 1-day, timeboxed spike. Success criteria: (1) the package delegates to LengthAwarePaginator/CursorPaginator rather than reimplementing offset math; (2) the JSON meta/links contract matches our API style guide verbatim; (3) it works under config:cache with the sb- prefixed config, and removal is a single interface swap. If all three pass, adopt behind an internal Paginator interface with the package as one replaceable implementation. If any fail, copy the Blade partials and the response-shaping helper into our codebase and move on — we get the consistency benefit with none of the bus-factor-1 exposure. Do not let it leak into controllers or models directly, and do not let it own query construction.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource