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

Laravelfilters Laravel Package

tiagomichaelsousa/laravelfilters

Laravel Filters lets you filter Eloquent models directly from query strings. Define reusable filter classes, attach them to models with a simple trait, and compose filters per request. Includes artisan generators for creating filters quickly, keeping controllers clean and queries readable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. LaravelFilters (tiagomichaelsousa/LaravelFilters) is a thin abstraction over Eloquent query construction: a base Filter class plus a trait that composes declarative filter classes onto a model or query builder. It sits above the persistence layer and below the controller/service layer, so it does not touch schema, migrations, or the request lifecycle. That is an architecturally low-risk insertion point — adoption is reversible per-model and does not create a hard dependency that other subsystems must be aware of. It does, however, position a third-party package inside the data-access path, which is the part of the codebase most sensitive to framework upgrades.

Integration feasibility. v1.7.0 is a compatibility release: it is described as adding Laravel 11 support and Laravel 12.x compatibility. For an application on Laravel 11 or 12, this is the release that unblocks or preserves adoption; for applications on Laravel 10 or earlier, there is no indicated functional change. There are no new features, no schema changes, and no announced deprecations, so integration effort is limited to a Composer constraint update and a regression pass on existing filter classes. The absence of any listed breaking change is the substantive finding.

Technical risk. Low-to-moderate, and mostly not about this release. The dominant risks are non-technical: single-maintainer project, small contributor base, and a release cadence that appears to be compatibility-driven rather than continuous. The changelog itself is ambiguous — the top-level bullet says "Laravel 11 support" while the section header says "Laravel 12.x Compatibility" — which means the actual illuminate/support constraint range cannot be inferred from the notes. Verify whether v1.7.0 widened constraints (11 and 12 supported alongside prior versions) or moved them (older Laravel dropped). A minor version bump normally signals the former, but this package's Composer constraints are the only authoritative source. Second risk: no mention of PHP version floor, CI matrix, or security policy updates, so PHP 8.2/8.3/8.4 support is unconfirmed.

Key questions.

  • What is the exact illuminate/* and php constraint range in v1.7.0's composer.json, and is Laravel 10 still resolvable?
  • Does the test matrix actually run against Laravel 11 and 12, or is support declared without CI coverage?
  • Are there behavioural changes in filter resolution, request-to-filter binding, or exception handling that the note omitted?
  • Is there a tagged security/support policy and a stated maintenance window?
  • Does the package cover the filtering patterns we actually need — relation/nested filtering, allowlisted filter keys, and query-string validation — or will we supplement it?

Integration Approach

Stack fit. Best fit is a Laravel 11/12 application with conventional Eloquent models and a moderate number of index/list endpoints that currently accumulate ad-hoc when() clauses or duplicated query scopes. The package's value proposition is consolidation and testability of those filters, not new capability. Applications that already use a first-party query-builder pattern or Spatie's query-builder should not adopt this — the marginal benefit does not justify a second filtering idiom.

Migration path. Additive and non-destructive: pin ^1.7 in Composer, confirm the resolved constraint set, apply the trait to one model, and port a single existing filter to validate the contract. No data migration, no config publishing required for a first pilot, and no downtime. Existing inline filtering can coexist indefinitely, which allows incremental adoption model-by-model.

Compatibility. The relevant compatibility axis is the Laravel major, not the package minor. Confirm the lockfile resolves cleanly against the framework version in each service before rollout, and re-verify on the next Laravel major — this release is evidence that the package tracks framework majors, but with a lag, which is the scheduling dependency to plan around. PHP version compatibility should be read from composer.json, not inferred.

Sequencing.

  1. Read composer.json and CI config in the v1.7.0 tag; record the supported framework/PHP matrix.
  2. Pilot on one non-critical read endpoint behind existing test coverage.
  3. Establish an internal convention for filter classes (naming, allowlisting, one class per resource) before broad adoption.
  4. Roll out to remaining models opportunistically, not as a dedicated migration project.
  5. Re-evaluate at the next Laravel major release, treating package compatibility as a tracked upgrade dependency rather than an assumption.

Operational Impact

Maintenance. Ongoing cost is near zero at runtime and low but non-zero organisationally: version pinning, periodic constraint checks at each framework upgrade, and ownership of any local filter conventions. The real maintenance exposure is bus factor. A single-maintainer package in the data-access path warrants a documented contingency — either a willingness to fork (the code surface is small enough that forking is a realistic option) or a decision to vendor the filter base class internally if the project stalls.

Support. Community-only, no commercial backing. Support for the team will come from internal documentation and the pilot implementer, not from the upstream project. Budget for one person to own the internal pattern and answer questions.

Scaling. Negligible performance overhead — filters compile to the same query builder calls the application would write directly. Scaling risk is behavioural, not architectural: filter parameters derived from unsanitised query strings can produce unindexed predicates, unexpected LIKE '%...%' scans, or expensive joins. Mandate an explicit allowlist of filterable keys per model and load-test the heaviest list endpoints after adoption, not before.

Failure modes.

  • Framework upgrade stall: a new Laravel major ships before the package supports it, blocking the app's upgrade. Mitigation: track upstream releases, tolerate a short lag, fork if lag exceeds one release cycle.
  • Constraint surprise: v1.7.0 silently narrows supported framework versions, breaking resolution in a service still on an older Laravel. Mitigation: verify constraints per service; do not assume a minor bump is purely additive.
  • Unvalidated filter input: invalid or hostile filter keys surface as 500s or slow queries. Mitigation: allowlist keys, validate at the boundary, map filter failures to 4xx.
  • Abandonment: no releases for an extended period. Mitigation: documented fork plan; the surface area is small.
  • Silent behaviour drift: undocumented changes in filter resolution between versions. Mitigation: pin exact versions and rely on the pilot's test coverage as the regression gate.

Ramp-up. Low. A mid-level Laravel developer should be productive with the base class and trait within half a day, given the package's narrow API. The heavier lift is social, not technical: establishing and enforcing the allowlist and filter-class conventions so the codebase does not accumulate inconsistent filtering styles. Allocate roughly one day of enablement (pilot plus a short internal write-up) and treat the convention document as the primary deliverable of adoption, not the dependency itself.

Confidence note. This assessment is derived solely from the v1.7.0 release notes; no source, changelog diff, or dependency manifest was available. The compatibility-matrix ambiguity above should be resolved before the assessment is treated as decision-grade.

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.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log