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

Laravel Filters Laravel Package

mykeels/laravel-filters

A lightweight Laravel package for declarative, request-driven Eloquent filtering. Define which filters a model allows and let query-string parameters like ?status=active narrow results safely, keeping controllers clean and queries reusable, with support for custom filter logic.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping for list/collection endpoints. Any roadmap item involving "browse, search, or narrow down" data (admin tables, reporting views, customer portals, public API collections) needs a filtering convention. This package frames filtering as a first-class, composable concern rather than ad-hoc if ($request->has(...)) chains scattered across controllers — a decision about where filtering logic lives, not just whether to ship a feature.
  • Build vs. buy for a filtering abstraction. The core PM question: do we hand-roll a filter layer, adopt a package, or accept controller-level query string handling? This package is a candidate for the "adopt a small, single-purpose package" branch. It is deliberately narrow (query-string-driven, composable filters), which makes the buy decision cheap to reverse.
  • API surface and contract decisions. Because filters are driven by query strings, it forces an explicit decision on which parameters are public contract (documented, versioned, supported) versus internal conveniences. That's a product/API governance call, not just an implementation detail.
  • Consistency and UX standardization. A composable filter interface encourages a shared convention across endpoints — same param naming, same operators, same behavior — which reduces support tickets and documentation drift as the number of filterable surfaces grows.
  • Roadmap sequencing. Adopting early sets a pattern that later features (saved filters, faceted search, filter chips in UI) can build on; adopting late means retrofitting and potentially reworking endpoint contracts.
  • Use cases it fits well: internal admin/back-office list views, dashboards with modest filter needs, early-stage APIs where a full search stack is overkill, and teams already standardized on Laravel conventions.

When to Consider This Package

Consider it when:

  • You are on Laravel and have (or expect) multiple endpoints needing similar, simple query-string filtering.
  • Requirements are filtering, not search — equality, ranges, relationships, simple operators — and you don't yet need relevance ranking, typo tolerance, or faceting.
  • Your team values small, readable, single-responsibility dependencies over feature-heavy frameworks.
  • You want filtering logic extracted into testable, reusable units without designing that abstraction yourselves.
  • You can absorb the risk of a low-adoption dependency by wrapping it behind your own interface.

Look elsewhere when:

  • Adoption and maintenance risk is unacceptable. 16 stars and a composite score of 0.49 are weak signals: limited community, limited battle-testing, uncertain long-term maintenance, and thin answers when you hit edge cases. For a long-lived or high-traffic product, an actively maintained alternative (e.g., a query-builder-style package with a large user base) or a small in-house abstraction is the safer call.
  • You need real search. Full-text, fuzzy matching, relevance, or faceting belong in a search engine (Meilisearch, Typesense, Elasticsearch, or Laravel Scout), not a query-string filter layer.
  • You need a complex, nested filter DSL. Deep boolean logic, grouped conditions, or GraphQL-style filtering will likely outgrow a composable query-string interface.
  • Security and authorization are non-trivial. Any filter layer must prevent users from filtering on columns or relations they shouldn't see. Verify the package's allow-listing story before committing; multi-tenant or role-scoped data makes this a hard requirement.
  • You're not on Laravel, or you're on a version the package doesn't clearly support.
  • You need SLAs, vendor support, or a security-review trail — none of which a 16-star package provides.

Default recommendation: time-boxed spike (half a day to two days) inside one non-critical endpoint, wrapped behind an internal Filter contract so it can be swapped without touching call sites.

How to Pitch It (Stakeholders)

To executives: This is a small, low-cost Laravel package that standardizes how we let users filter lists of data — the "narrow by status, date, owner" behavior that shows up in nearly every dashboard and admin tool we build. The value is velocity and consistency: instead of each engineer inventing filtering per endpoint, we get one convention, less duplicated code, and fewer bugs and inconsistencies. The cost is near zero and the decision is easily reversible. The caveat is maturity — it's a niche package with a small user base — so the recommendation is a short, contained pilot rather than a company-wide standard. If the pilot is clean, we save recurring effort on every future list view; if not, we've spent a day and learned something.

To engineering: It gives you a composable interface for filtering Eloquent queries from query strings, so filter logic lives in named, testable units instead of controller conditionals. It's deliberately minimal — no search engine, no magic. The ask is to evaluate it behind our own thin interface: define an internal filtering contract, implement it with this package in one endpoint, and confirm (a) allow-listing of filterable columns and relations is airtight, (b) it composes cleanly with existing scopes and authorization, and (c) it's easy to replace. Treat 16 stars as a signal to read the source — it's small enough to audit in an afternoon. Success criteria: one endpoint shipped, tests covering disallowed-parameter rejection, and a documented swap path if we walk away.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource