velitsol/eloquent-filter
A Laravel package for adding clean, reusable filters to Eloquent models. Define filter classes and apply them via simple query strings or request parameters, keeping controllers slim and queries readable. Supports custom filter logic, sorting, and easy extension for building flexible, searchable API...
?filter[status]=active&filter[owner_id]=…). It informs the roadmap decision of whether filtering is a shared platform capability or per-endpoint hand-coding.Recommendation: do not adopt for production. Use only as prior art.
Consider it only as:
Look elsewhere — or build — if any of these hold:
Preferred path: evaluate spatie/laravel-query-builder (actively maintained, allowlist-first by design, very high adoption) against a ~1–2 week in-house trait. For most teams the in-house option wins: filtering is ~200 lines, it eliminates the dependency entirely, and it lets us enforce allowlisting and tenant scoping by construction.
To executives: We found a package that would deliver filterable lists and API endpoints quickly, but it's been archived — it receives no updates or security fixes, has no downstream users, and would become something we own and maintain without having chosen to. The time saved up front (roughly one to two weeks) is smaller than the cost of a mid-flight migration or a security finding later. Recommendation: build a small in-house filtering layer, or adopt the maintained market-standard package, at comparable near-term cost with materially lower long-term risk. Net: no material schedule impact, significantly better risk position.
To engineering: Evaluate as a spec, not a dependency. The archived status and zero dependents mean no upstream fixes for framework upgrades, no security response, and no community triage. Whichever implementation we choose must: allowlist every filterable field and relation explicitly (no client-driven column access), reject or ignore unknown params deterministically, scope by tenant/authorization at the query layer, avoid N+1 when filtering on relations, and keep the query-string contract documented and versioned. Deliverable: a short spike comparing spatie/laravel-query-builder against an in-house trait, with the contract spec — decision within one sprint.
Bottom line: Reject for production adoption; retain as design input. Fund a one-week spike, then commit to a maintained or in-house filtering layer.
How can I help you explore Laravel packages today?