eonx-com/easy-pagination
Easy Pagination is a lightweight Laravel/PHP package that simplifies paginating query results and collections. It offers a clean, consistent API for building paginators, controlling page sizes, and integrating with Eloquent and the query builder, making reliable pagination easy to add to APIs and vi...
page / per_page parsing, defaults, and hard caps live in one shared helper or get re-implemented per endpoint. This package is a candidate reference implementation for that contract, not a platform commitment.$request->get('page') drift.paginate() doesn't fit.Consider it when:
PaginationParamsFactory) so the vendor class never leaks into controllers, services, or repositories.Look elsewhere when:
paginate() plus form-request validation is fewer moving parts and has a maintainer.illuminate/*, the case for adoption collapses to "copy the idea."Executive summary. This is a tiny, MIT-licensed utility that parses client pagination parameters (page, per_page) with configurable defaults and upper limits, for Laravel/Lumen and plain PHP. It could cut repetitive code and improve API consistency, but it is not a strategic platform dependency: 2 stars, zero dependents, a read-only monorepo split, and docs-level maturity mean real lifecycle risk. Recommendation: approve a one-to-two-day evaluation or reference use only, isolated behind an internal adapter, pinned to an exact version, with a documented exit plan. A ~40-line in-house value object is a legitimate outcome of that evaluation and should not be treated as a failure.
Engineering summary. Understand the category first: this is a pagination-input library, not a paginator. It standardizes request parsing into a value object and sits underneath your existing query layer without competing with LengthAwarePaginator. Fit is clean in hexagonal/DDD codebases where pagination params are a domain concept; it is a poor fit where controllers already use Laravel's built-in pagination, because you'd run two parallel vocabularies.
Before adoption, verify in this order: composer.json PHP/Laravel constraints (below PHP 8.1 is a non-starter; check for illuminate/* coupling), src/ for actual validation behavior (does it cap per_page, reject negatives, handle missing params?), tests/ as the real edge-case spec, and tag dates in both the split and the parent monorepo. Then: wrap behind an interface, pilot on one low-traffic list endpoint for a sprint, and roll out only if it beats the in-house alternative ergonomically. Pin exactly; audit composer why for transitive eonx-com/easy-* creep. Runtime risk is negligible — constant per-request cost, no state, no scale concerns, almost no attack surface. The risk is upgrade maintenance: the package either keeps pace with PHP/Laravel or it doesn't, and with zero dependents nobody will notice first. Budget an annual review, triggered by every PHP minor bump, and enforce your own per-page caps in the adapter so a caller can never request 100,000 rows. Ramp-up for a mid-level developer is under an hour; the real cost is the governance convention that keeps the vendor class out of application code — track that during rollout, because it is what erodes first.
How can I help you explore Laravel packages today?