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

dcblogdev/laravel-filters

dcblogdev/laravel-filters provides a lightweight way to filter Laravel Eloquent queries from request parameters. Define allowed filters, apply them through a reusable trait, and keep controllers clean with composable, testable filtering logic.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on query filtering/search. dcblogdev/laravel-filters is a narrow, single-purpose utility for turning request query strings into Eloquent filters. It is a candidate to replace hand-rolled if ($request->has('status')) blocks that accumulate in controllers and repositories — a small but recurring tax on every feature that adds filterable attributes.
  • Feature scope for list/index screens. Directly relevant to admin tables, reporting views, and API collection endpoints where filter/sort/paginate behavior is table stakes. Reduces the incremental cost of shipping "filter by X" for new entities.
  • Roadmap confidence in the framework upgrade path. v2.0.3 adds explicit Laravel 13 support. That is the only substantive change in this release and it directly de-risks a future framework upgrade: a dependency that supports the next major means fewer forced rewrites during the Laravel 12 → 13 migration window.
  • Maintenance-cost budgeting. The release is almost entirely Dependabot bumps (Symfony components, league/commonmark, PHPUnit, psy/psysh) plus the Laravel 13 compatibility commit. That signals a low-churn, low-drag dependency — cheap to carry, cheap to drop.
  • Not a decision driver for: authentication, authorization, API versioning, or complex faceted search. Scope is thin filtering, not a search engine.

When to Consider This Package

Adopt when:

  • You have (or expect) multiple Eloquent models needing consistent query-string filtering, and controllers are drifting into duplicated filter logic.
  • Your team wants a small, readable package over a heavier filtering/search platform (e.g., Laravel Scout, Meilisearch, Elasticsearch) for straightforward where-style filters.
  • You are planning or currently executing a Laravel 13 upgrade and want dependencies that already declare support.
  • You are comfortable with a single-maintainer package for a non-critical, easily replaceable concern — the blast radius if it is abandoned is small, since filtering logic is contained and swappable.

Look elsewhere when:

  • You need relevance-ranked full-text search, faceting, aggregations, or typo tolerance — that is a search engine decision, not this package's job.
  • You require vendor SLA, security review attestation, or long-term commercial support; this is community-maintained, and the release history shows Dependabot-driven maintenance rather than active feature development.
  • Your filtering rules are highly dynamic or domain-specific (per-tenant schemas, policy-driven field visibility). You will likely outgrow the abstraction and end up wrapping it anyway.
  • You are pinned to an older Laravel major and cannot take v2.x — verify the version constraint against your composer.json before committing, and note the v2 line implies you are already on a recent major.

Caveat on evidence quality: this assessment rests on the v2.0.3 notes only — no download counts, issue throughput, or security advisory history was supplied. Treat adoption as a low-risk trial (one or two endpoints), not a standards decision, until you have reviewed the package source and its open-issue backlog yourself.

How to Pitch It (Stakeholders)

For executives (one line): A small, free Laravel component that standardizes how our list and report screens filter data — it now supports Laravel 13, so adopting it reduces rework in our next framework upgrade and trims repetitive code in every new admin screen we ship.

For engineering leads:

  • What it does: converts request query parameters into Eloquent filters, so filtering behavior is declared once instead of re-implemented per controller.
  • Why now: v2.0.3 adds Laravel 13 compatibility. This is the window to adopt it before a framework upgrade hardens our current patterns in place.
  • Risk profile: low and contained. Single maintainer, minimal surface area, no service dependency, no data migration. Worst case is replacing it with ~100 lines of in-house code — it is not a lock-in.
  • Cost of not doing it: we keep writing and reviewing the same ad-hoc filter blocks, and we carry that duplication through the Laravel 13 migration.
  • Recommendation: pilot on one non-critical index endpoint, measure the code removed, and revisit at the next architecture review. Do not adopt across all endpoints until the pilot confirms behavior on our real query shapes (relations, nested filters, validation of untrusted input).
  • Action required: engineering to confirm the package's filter syntax covers our common cases and that query-parameter input is safely constrained against our existing validation and authorization conventions before rollout.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console