ecommit/paginator
Lightweight PHP paginator for arrays or ArrayIterator. Configure page, max_per_page, and data; optionally provide total count for large datasets. Iterate results, get last page, and use count() to know items on the current page.
max_per_page, offset-based pagination, or hybrid data sources).count() is expensive (e.g., streaming data) by using the count option to predefine totals.Cursor or LengthAwarePaginator (e.g., external APIs, cached results, or custom iterators).paginate() is sufficient and optimized).spatie/laravel-pagination or fideloper/proxy)."This package lets us add pagination to any data source—whether it’s from a database, an API, or even in-memory arrays—without locking us into Laravel’s full ORM. It’s a lightweight, MIT-licensed solution that reduces dev time for features like admin dashboards or API wrappers. For example, if we’re building a tool to paginate third-party API responses or legacy data, this avoids reinventing the wheel while keeping our stack lean. The trade-off is minimal maintenance risk (low stars, but MIT license and simple codebase), and it aligns with our goal to [reduce technical debt/improve performance/speed up feature delivery]."
*"Pros:
max_per_page, pre-defined counts (for expensive count() operations), and iterator-based data.Cons:
paginate().page > totalPages).Recommendation: Use this for non-database pagination (e.g., API responses, cached data) or as a fallback when Laravel’s pagination is overkill. Pair it with a frontend library (e.g., laravel-pagination-links) for UI consistency."*
How can I help you explore Laravel packages today?