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

Technical Evaluation

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:

  • A compatibility statement: explicit support for Laravel 13 (PR #12). This is the only first-party change and the only item that should affect our decision.
  • Eight Dependabot bumps, all of which are dev/transitive dependencies (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:

  1. Unverified framework support. "Support for Laravel 13" delivered in a patch release is a claim we must test, not a guarantee. Semver-wise a widened constraint is non-breaking, but it also means a user on Laravel 13 can now install a combination the maintainer may not have run.
  2. Test toolchain age. PHPUnit 9.6 is receiving security-only maintenance upstream. A package advertising support for the newest Laravel major while testing on PHPUnit 9 is a signal that the test suite has not been modernised. It does not break us, but it lowers confidence in the depth of coverage behind the compatibility claim.
  3. Input-to-query surface. Any package that turns request parameters into query constraints concentrates injection and unbounded-scan risk in one place. The blast radius is small (per-endpoint opt-in) but the failure mode is a data-exposure or performance incident, so it belongs on the review checklist regardless of version.

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:

  • Does CI run against Laravel 13 and PHP 8.4, or was the constraint widened without a matrix entry?
  • Are the bumped Symfony/CommonMark packages in require or require-dev? Only the former affects our dependency graph.
  • Any plans to move to PHPUnit 10+ and a supported-PHP matrix?
  • What is the documented policy for declaring new Laravel major support—patch release, or a minor with a CI matrix link?

Integration Approach

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:

  • Backward: Patch release, no API change, no deprecations. Safe to take on the current major.
  • Forward: Laravel 13 support is asserted, not demonstrated. Treat it as "installable" until we have run our own suite against it.

Migration path. There is effectively no migration. The realistic paths are:

  1. Stay on 2.0.2 if we are not on Laravel 13 — zero benefit from this release beyond dependency hygiene.
  2. Take 2.0.3 on the current framework — cheap, gets us the version the maintainer will support going forward.
  3. Take 2.0.3 as part of a Laravel 13 upgrade — the intended use case, but only after validation.

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.

  1. Confirm composer why for each bumped package — establish whether any land in our runtime graph or are dev-only.
  2. Upgrade to 2.0.3 on the current Laravel version; run the existing filter test coverage. This is a low-cost regression baseline.
  3. If a Laravel 13 upgrade is on the roadmap, add a spike: branch on Laravel 13, install 2.0.3, exercise every filtered endpoint against a seeded database, including hostile inputs (nested params, array injection, unknown keys, ? in values).
  4. Only after step 3 passes, allow the Laravel 13 constraint to be adopted in the mainline.
  5. Record the Laravel 13 validation result in our internal package register so the next upgrade does not re-litigate it.

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.

Operational Impact

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.

  • Silent no-op: an unrecognised or misspelled filter key is ignored rather than rejected, so a client can believe it filtered when it did not. This is the most likely production surprise; test for it explicitly.
  • Widened input surface: array/nested parameters and operator injection if filter keys are not whitelisted. Mitigate at the endpoint, not by trusting the package default.
  • Unauthorised scope leakage: a filter that reaches a column the caller should not query (e.g. filtering on a tenant or role column) can leak existence information. Keep filter definitions adjacent to authorisation logic.
  • Framework drift: a Laravel minor changes query-builder internals and the package lags. Low probability, low impact, easy to detect via CI on the filtered endpoints.
  • Dependency graph surprise: if a bumped package is in 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.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast