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.
Architecture fit. dcblogdev/laravel-filters is a small, single-purpose package that maps request query-string parameters onto Eloquent query constraints. Architecturally it sits in the request→persistence seam, which means it is easy to adopt incrementally (per-model or per-endpoint) and easy to bypass where it does not fit. It does not impose a service provider contract, repository pattern, or base model requirement beyond a trait/interface, so it will not dictate application structure. That is the right shape for a utility of this size: low coupling, opt-in, removable.
What v2.0.3 actually changes. This is a patch release with no functional changes to the filtering API. The substantive content is:
symfony/http-foundation, symfony/process, league/commonmark, phpunit, psy/psysh, laravel/framework at 10.48.29). None of these are runtime requirements we inherit—they are the maintainer's own test/CI toolchain, unless the package declares them in require rather than require-dev, which we should confirm.Integration feasibility. High. A patch bump from 2.0.2 carries no API surface change, so the integration cost is essentially a composer update plus a regression run. The Laravel 13 claim is the one item requiring validation rather than acceptance: a widened illuminate/* constraint is not proof the package works on Laravel 13. The pinned laravel/framework at 10.48.29 in the dependency list, and phpunit/phpunit still at 9.6.x, suggest the CI matrix may not actually exercise Laravel 13 or modern PHPUnit. That is the single most important verification step.
Technical risk. Moderate-to-low, concentrated in three areas:
Bus factor. Single-maintainer project (@dcblogdev). Dependency updates are automated, which is a positive health signal, but there is no second committer absorbing the framework-support work. Plan for the possibility of owning a fork.
Key questions for the maintainer / our own validation:
require or require-dev? Only the former affects our dependency graph.Stack fit. Assumes Laravel 10+ and PHP 8.1+. v2.0.3 keeps the existing illuminate/* range and extends it upward to Laravel 13, so it is a strict superset of the current support envelope—no existing install is invalidated. Composer resolution should be a no-op for teams on Laravel 10/11/12 and will now resolve for Laravel 13.
Compatibility. Two axes:
Migration path. There is effectively no migration. The realistic paths are:
Recommendation: take option 2 now (keeps us off a pinned old patch for no reason), and gate any Laravel 13 upgrade on option 3 validation rather than assuming this release clears the path.
Sequencing.
composer why for each bumped package — establish whether any land in our runtime graph or are dev-only.? in values).Where it should and should not be used. Good fit for internal admin/back-office list endpoints and read-heavy index screens where filters are known and enumerable. Poor fit for public-facing search where filter keys are unbounded—there, either whitelist allowed filters explicitly or keep filtering behind a dedicated query object we control.
Maintenance. Near-zero ongoing cost. The package has no runtime service, no migrations, no config publishing requirement, and no background processes. Upgrades arrive as automated dependency bumps, which is exactly the maintenance profile we want from a leaf dependency. The real maintenance question is not this package but the single-maintainer risk: budget for the possibility of vendoring or forking if Laravel 14 support lags beyond one release cycle.
Support. No commercial support, no SLA. Community issues on GitHub only. Acceptable given the package's size and our ability to replace it with ~100 lines of query-scope code if needed. Confirm the licence (MIT) is on our approved list and that we have a documented exit path.
Scaling. Negligible runtime footprint—it is query-builder composition, not middleware doing per-request work of consequence. Scaling risk is entirely about query shape, not the package: unconstrained filters against large tables will produce full scans regardless of who builds the query. Enforce indexing review on any endpoint that adopts filtering, and cap the number of active filter clauses where users control them.
Failure modes.
require rather than require-dev, the update pulls a newer Symfony component into our tree. Confirm before merging.Ramp-up. Minutes for a developer familiar with Eloquent: define the allowed filters, apply the trait, write a test. The package is small enough that reading the source is faster than reading docs. The onboarding cost that matters is the convention—where filter definitions live, how they are authorised, how they are tested—so write that down once rather than letting each team invent it. Budget roughly half a day for the first endpoint including tests, and near-zero for subsequent ones.
Bottom line. v2.0.3 is a routine patch release whose only decision-relevant content is an asserted—not yet proven—Laravel 13 compatibility. Adopt it; do not treat it as evidence that a Laravel 13 upgrade is de-risked. The one substantive action is to validate the framework claim independently before relying on it.
How can I help you explore Laravel packages today?