nahidulhasan/eloquent-filter
Eloquent Filter brings declarative, request-driven filtering to Laravel Eloquent models. Define allowed filters, map query-string parameters to columns or scopes, and keep controllers clean while composing reusable, chainable filter rules for APIs and admin listings.
?status=active&created_after=2024-01-01). This package provides a convention for mapping request parameters to Eloquent constraints, reducing bespoke filtering code per model.if ($request->has(...)) blocks scattered across controllers, which lowers bug surface and makes filter behavior more predictable across teams.Consider adoption when:
Look elsewhere when:
For executives: This is a low-cost, low-risk accelerator for back-office filtering—a commodity capability, not a strategic bet. It can shorten delivery of admin and reporting features, and lock-in is low because the package is small and forkable. The main risks are limited community validation and long-term maintenance, which we can mitigate by pinning the version, adding tests, and piloting on one internal surface before broader use. Recommendation: pilot it for internal/admin filtering; do not treat it as the foundation for customer-facing search.
For engineering: The package fits Laravel/Eloquent conventions and keeps filtering logic out of controllers, making endpoints easier to test and maintain. Because adoption is small (24 stars), treat it as a code-review-first dependency: verify compatibility with our Laravel version, confirm filter parameters are allowlisted, add authorization and SQL-injection tests, and isolate it behind our own interface so it can be replaced or forked. A one-to-two-day spike on a single admin endpoint should be enough to validate fit.
How can I help you explore Laravel packages today?