ralphschindler/basic-query-filter
A lightweight Laravel package for applying request-driven filters to Eloquent queries. Map query-string parameters to allowed columns and operators, keeping filtering logic out of controllers and list endpoints predictable and reusable.
filter=status:active AND created>2024-01-01) versus a fixed set of query params. This affects API versioning, documentation, SDK design, and backward-compatibility obligations.Consider it when:
Look elsewhere (or build) when:
$filter, or RQL; ecosystem tools, docs, and SDKs already exist there.For executives: This is a small, free, public-domain parser that could let customers filter lists and build saved views without us writing a query language from scratch. The catch is that it has been dormant since 2017 and has almost no user base, so the real cost is not the license — it is the engineering ownership, security review, and ongoing maintenance we would assume. Recommendation: treat it as a reference design or a vendored starting point inside a prototype, not as a production dependency we rely on for a customer-facing, revenue-touching feature. If filtering is on the roadmap as a differentiator, budget a short, contained build-or-adopt spike with an explicit owner rather than adopting by default.
For engineering: It gives you a tokenizer/parser you can wrap behind a stable internal interface, with the parsing layer decoupled from query execution. Assume you own it: add input-size and nesting limits, allowlist filterable fields per role, translate the AST to your query builder, and cover it with tests. The Unlicense is permissive and commercially safe, but comes with no warranty and no patent language — fine for internal use, worth a legal glance if embedded in a distributed product. Do not let user-supplied filter strings reach the database unvalidated.
How can I help you explore Laravel packages today?