smilingplants/pager-bundle
smilingplants/pager-bundle provides lightweight pagination for PHP applications, helping split large result sets into manageable pages for lists, search results, and admin screens. It offers a simple pager API with configurable page sizes and minimal setup.
LengthAwarePaginator, cursorPaginate, ->links(), publishable Blade views covering Tailwind/Bootstrap). The correct product decision is to use the framework primitive and, if a distinct pager style is required, ship a small internal Blade component. Adopting this package would mean buying a rewrite.Illuminate\Pagination integration. It cannot inform decisions about API pagination, cursor/keyset paging, or filter-preserving page links in a Laravel product.Consider it only when all of the following hold:
Look elsewhere when:
composer require will fail at the resolver against PHP 8 and Symfony 5+, and forcing it past that (--ignore-platform-reqs) drags an EOL dependency tree and Twig 1.x security advisories into runtime.OFFSET degradation); the answer is keyset/cursor pagination, which this bundle does not provide and Laravel's cursorPaginate() partially does.Executive summary: Do not adopt. This is a Symfony 2-era, Twig-only pager bundle with one star, zero dependents, and no upstream maintenance — and it is not a Laravel package, despite how it is described. There is no integration to perform, only a rewrite, so the engineering cost of "adopting" it exceeds the cost of simply building the pager view we want on top of Laravel's existing paginator. Recommendation: take no dependency; spend a few hours replicating the pager's visual design in a Blade partial and record the security/EOL rationale so this doesn't get re-proposed the next time pagination UI comes up.
For engineering: Symfonony bundles are bootstrapped through AppKernel and the DI container; Laravel has service providers and a facade lifecycle — there is no shim. Expect a hard Composer conflict on PHP 8 / Symfony 5+, and do not resolve it with --ignore-platform-reqs, because that defers an end-of-life dependency tree (including Twig 1.x template-injection advisories) into production. Instead: (1) 2-hour spike to read the templates and capture the interaction spec, then stop; (2) rebuild the markup as a Blade view over LengthAwarePaginator using ->onEachSide(), ->withQueryString(), and ->fragment(); (3) add tests pinning page counts, empty results, and query-string preservation — that last one is the easy bug to ship, since dropping withQueryString() silently loses filters on page two. If a custom pager abstraction is genuinely warranted later, own it as an internal app/Support/Pagination class plus a Blade component, inside our own test and upgrade surface.
Risk register entries: resolver failure on modern PHP (high likelihood, low cost — fails fast); EOL transitive advisory reachable only if forced (low likelihood if disciplined, high cost); escaping divergence between Twig autoescape and Blade {{ }} during any naive port; query-string loss on filter links; and orphaned vendored code drifting from framework conventions at the next Laravel major upgrade.
How can I help you explore Laravel packages today?