kblais/query-filter
A Laravel package for building reusable, request-driven query filters for Eloquent models. Map parameters to filter classes, keep controllers clean, and compose testable filtering logic without cluttering your queries.
?filter[status]=active&sort=-created_at) without hand-rolling parsing per endpoint.Consider adopting when:
when() clauses.Look elsewhere when:
composer.json, test suite coverage and CI status, release cadence over the past 12–18 months, how allow-listing failures behave (fail-closed vs. fail-open), and whether invalid parameters return 4xx or silently ignored input. v3.4.0 is a compatibility-only release — no behavioral change — so it does not resolve any of these questions.For executives (one paragraph): We currently hand-build filtering and sorting for every list screen and API endpoint. This package replaces that repeated work with a small, focused library that enforces a safe allow-list, so clients can only filter on columns we've approved — reducing both engineering time and a class of data-exposure bugs. The new v3.4.0 release adds Laravel 13 compatibility, which means adopting it will not create friction in our next framework upgrade. It is a small dependency, not a platform commitment, and it does not change our product surface — it reduces the cost of building surfaces we've already planned.
For engineering (talking points):
?sort=" failure mode.composer.json matches our target version.How can I help you explore Laravel packages today?