architools/laravel-sieve
A Laravel package that adds a lightweight, composable filtering layer to Eloquent queries. Define sieves to sift model results by request parameters, keeping controllers clean and query logic reusable across your app.
scopeFilter() variant. A package like this turns a repeated build cost into a one-time adoption decision.?filter[status]=active&sort=-created_at) is a product-level decision: it becomes a documented, versioned contract for customers and integrations. Standardizing early avoids a painful breaking change later.Consider it when most of the following hold:
LIKE, date bounds, relation filters, and sortable-column allow-lists.Look elsewhere — or build in-house — when:
spatie/laravel-query-builder occupies the same problem space with orders of magnitude more production exposure; that comparison should be made explicitly, not skipped.For executives: List, search, and filter screens are a recurring cost across our roadmap — every team rebuilds them slightly differently, and each rebuild carries a small but real security risk. This package is a lightweight, allow-list-driven way to standardize that layer and make "add a filter" a configuration task instead of engineering work. The trade-off is honest: it is a young, single-maintainer open-source library with no meaningful adoption yet, so the recommendation is a time-boxed evaluation and pilot on one non-critical surface — not a platform-wide commitment. We would wrap it behind our own interface so the exit cost stays low. Success criteria: pilot ships faster than the in-house estimate, and the abstraction holds without leaking into controllers. If it fails either, we fall back to the better-established Spatie package or a small internal module.
For engineering: Thin abstraction over Eloquent and the query builder for declarative filters and sorts. The value is the allow-list model — sortable and filterable columns become explicit, auditable config rather than string concatenation — plus removal of duplicated scope logic. It is small enough to read end-to-end before adopting. Adopt behind an internal adapter, pin the version, and treat the fork as ours if upstream stalls. Benchmark against spatie/laravel-query-builder before deciding; the star gap is a signal about maintenance risk, not necessarily about API fit. Watch for the usual traps: unindexed sort columns, relation filters causing N+1s, and filter keys that don't map to permitted fields.
How can I help you explore Laravel packages today?