Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eloquent Filter Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Faster delivery of filtered list experiences. Admin panels, back-office tools, dashboards, and CRUD APIs almost always need query-string filtering (?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.
  • Build vs. buy for commodity infrastructure. Filtering is rarely a differentiator. Adopting a small, focused package is usually cheaper than designing and maintaining an internal filtering layer—provided the API fits our conventions and the maintenance risk is acceptable.
  • Roadmap sequencing. Use it to unblock internal tools and MVP list endpoints now, and defer investment in a dedicated search platform until relevance, faceting, or scale requirements justify it.
  • Consistency across endpoints. A shared filtering approach reduces one-off if ($request->has(...)) blocks scattered across controllers, which lowers bug surface and makes filter behavior more predictable across teams.
  • Self-serve exploration for PMs and operations. Consistent filter parameters let non-engineering teams slice data by status, date, owner, or region in internal tools without requesting a custom report for every question.
  • Clear scope boundary. This package filters structured Eloquent data; it does not solve relevance search, typo tolerance, faceted search UX, analytics, or permission-aware filtering. Those remain separate product and architecture decisions.

When to Consider This Package

Consider adoption when:

  • The product is built on Laravel with Eloquent and the filtering needs are conventional: equality, ranges, dates, simple relationships, status fields.
  • The primary use case is internal/admin tooling, operational dashboards, or early-stage APIs, where time-to-market matters more than search sophistication.
  • The team wants a lightweight convention rather than a custom trait or a heavier query-builder abstraction.
  • Filters can be explicitly whitelisted and authorized, and the team is prepared to add integration tests around filter behavior.
  • The package can be version-pinned and, if necessary, forked—meaning lock-in is low and blast radius is contained.

Look elsewhere when:

  • The requirement is customer-facing search with relevance ranking, typo tolerance, facets, synonyms, or high query volume—use Laravel Scout with Meilisearch/Elasticsearch/Algolia or a comparable search service.
  • The domain needs complex boolean/nested queries, saved searches, per-tenant policy enforcement, or audit-grade access control.
  • The organization requires vendor support, SLAs, security certification, or long-term maintenance guarantees.
  • The maintenance signal is weak. With 24 stars and a low package score, community validation is limited; confirm recent releases, Laravel-version compatibility, issue responsiveness, and code quality before committing.
  • Security-sensitive filtering cannot be safely constrained. If filterable fields and operators are not explicitly allowlisted, build a wrapper or keep filtering in-house.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo