gsferro/filtereasy
FilterEasy is a Laravel package that brings simple, reusable filtering to Eloquent queries. Define allowed filters, map request parameters, and compose query scopes without boilerplate, keeping controllers clean and database queries readable and easy to maintain.
Architecture fit. gsferro/filtereasy is a thin, trait-based filtering layer that sits between the HTTP layer and the Eloquent query builder — it lets a model expose declarative filters driven by the request query string. Architecturally that places it at the most sensitive seam in a Laravel application: the point where untrusted input becomes a SQL predicate. It fits cleanly in a Laravel monolith or API service where list/index endpoints currently accumulate ad-hoc $request->has('status') conditionals, and it composes with API Resources and Form Requests rather than competing with them. It does not fit where filtering is already modeled explicitly (dedicated query objects, Spatie Query Builder, or hand-rolled scopes), because adopting it would mean re-opening stable endpoints for marginal gain.
Integration feasibility. Mechanically low-cost: composer require, package auto-discovery, publish config, apply the trait to a model, add filter classes. A credible pilot is 1–2 engineer-days. The effort is not in wiring — it is in the guardrails we would have to build around it.
Technical risk. The adoption signals are the dominant risk: 1 star, 0 dependents, a single maintainer, and a last release in October 2024. This is effectively unvetted third-party code operating on the query builder. Specific risks to retire before any production use:
Key questions.
composer.json constraints for laravel/framework and php, and is there CI across supported versions?Recommendation: conditional approval, scoped to internal, read-only, low-PII list endpoints. Not approved for customer-facing or tenant-scoped data until forked and hardened.
Stack fit. Laravel + Eloquent, MySQL/Postgres. No infrastructure requirements, no queue or cache dependency, no external service — which is the package's main operational virtue. Confirm framework constraints first; if it lags our Laravel major, that alone closes the evaluation.
Migration path. Incremental and endpoint-by-endpoint, not a sweep. Two entry scenarios:
Compatibility. Pin an exact version (not a caret range), commit the lockfile, and vendor or fork the source into our internal VCS. Run our own integration tests against it rather than trusting upstream CI. Treat any upstream release as a change requiring review, not an automatic bump.
Sequencing.
Filterable trait/facade so the dependency is one swap point; enforce a per-model allowed-fields config; normalize error handling to 422 instead of 500; add contract tests.Maintenance. We own this package the moment it touches production. Budget roughly 1–2 engineer-days per quarter for fork upkeep plus a defined slice of every Laravel major upgrade. Single maintainer means upstream is a convenience, not a support channel.
Support. MIT license, no vendor, no SLA, no disclosed security process. Ownership must be explicitly assigned to the platform/backend team, with a named individual responsible for monitoring upstream activity and applying patches. Without that assignment, the fork rots silently.
Scaling. The package itself does not scale — the database does. Filtering moves work into WHERE clauses, so the binding constraint becomes index coverage on filterable columns and the number of filter combinations a client can chain. Two mitigations belong in the hardening step: a hard page-size cap and a statement/query timeout, plus composite indexes on the field sets we actually expose. Watch for filters on unindexed or low-cardinality columns producing full scans under load.
Failure modes.
composer update.Ramp-up. Low for anyone fluent in Eloquent — half a day to first working filter. The offsetting cost is documentation: upstream docs are thin at this adoption level, so we must publish an internal usage guide and, critically, an approved-fields checklist that reviewers enforce at PR time. That checklist is the primary control that keeps the package's flexibility from becoming an information-disclosure vector.
How can I help you explore Laravel packages today?