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 Simple Query Filter Laravel Package

exeko/laravel-simple-query-filter

A lightweight Laravel package for adding simple, declarative query-string filters to Eloquent models, letting you turn request parameters into reusable filter logic with minimal code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy, resolved to "build." The package's entire value proposition is a trait that maps request parameters onto Eloquent query constraints. That is roughly 20–50 lines of first-party code. The decision this package actually informs is whether filtering is worth a dependency at all — and for a single trait, it usually isn't.
  • Roadmap scoping for filtering/search features. If list endpoints, admin tables, or search APIs are on the roadmap, this is a data point on the "cheap to prototype, expensive to own" end of the spectrum. Useful for sizing the effort: filtering itself is not the hard part; validation, allow-listing filterable columns, pagination, and sort semantics are.
  • Dependency governance and supply-chain policy. Zero stars, zero dependents, last release September 2020 (Laravel 8 era) means no maintainer, no security response path, and no compatibility work for Laravel 9/10/11+. This is the kind of package that should trip a "no unmaintained micro-dependencies in production" rule.
  • Tech-debt triage. If the trait is already in the codebase, it supports a decision to vendor or replace it rather than track it as an external dependency. Switching cost is near zero: no data migration, no schema impact, no customer-visible behavior change if the filter semantics are preserved.
  • Internal tools vs. customer-facing surfaces. Low-traffic admin panels can tolerate a stale helper; public, authenticated, or high-traffic endpoints cannot, because filter handling sits directly on user-supplied input and is a natural amplification point for expensive queries and injection-style bugs.

When to Consider This Package

Consider it only when all of the following hold:

  • The application is pinned to an older Laravel/PHP combination that the trait is known to work with, and there's no near-term upgrade planned.
  • The surface is an internal tool, prototype, spike, or throwaway admin panel where maintenance cost is genuinely near zero.
  • Filter keys are a fixed, developer-controlled allow-list — not arbitrary user-supplied column names.
  • You are prepared to fork or copy the trait into app/ (verify the license first) so you own the code rather than the dependency.

Look elsewhere when any of these are true:

  • New project, or a planned upgrade to Laravel 10/11/12 or PHP 8.2+. There's no maintainer to ship compatibility fixes, and you'll be the one debugging framework internals.
  • You need more than simple equality/LIKE filters: sorting, pagination contracts, relationship filters, includes, per-endpoint filter validation, or documented filter syntax.
  • Filtering touches public or authenticated endpoints, or falls under a security review, SOC 2 vendor inventory, or dependency-audit process.
  • Established alternatives fit: hand-rolled query-filter objects or Eloquent scopes (zero dependencies, full control), or a maintained package like Spatie's Query Builder if you want conventions, validation, and sorting out of the box.
  • The team can't absorb the "we now own this" cost. With one maintainer-less release from 2020, adopting it is functionally the same as writing it — so write it, with tests, under your own name.

How to Pitch It (Stakeholders)

Recommendation: do not adopt as a dependency. Treat it as a reference implementation at best.

To executives: This is a single-purpose helper published once in 2020 with no users, no maintainer, and no updates. It would save us roughly half a day of engineering and add an unowned component to our production stack. The trade is clearly negative: we'd take on ongoing compatibility and security-review overhead to avoid writing a small piece of code we'd have to understand anyway. If filtering is on the roadmap, we should budget the half-day and own the code.

To engineering: The trait is a thin wrapper over Eloquent query constraints. Reimplementing it as a first-party trait or filter object gives us the same ergonomics plus an explicit allow-list of filterable columns, validation, tests, and no version-compatibility surprises at the next Laravel upgrade. If it already exists somewhere in our codebase, plan to vendor it and add it to the replacement backlog — the migration is mechanical and low-risk.

Decision summary: Filtering is a feature we should build, not buy — and certainly not buy from an unmaintained package with zero adoption. Cost to build: under a day. Cost to adopt: under a day plus indefinite, unquantifiable maintenance risk. Choose the option where we own the code.

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.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
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