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

Eloquent Array Query Builder Laravel Package

williamoliveira/eloquent-array-query-builder

Query PHP arrays with a familiar Eloquent-style API. Filter, sort, group, and paginate in-memory data using where, orderBy, and limit methods, bringing Laravel's query builder ergonomics to plain arrays and collections without touching a database.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature: safe, user-configurable filtering without bespoke query code. The package translates an associative array (e.g., from a JSON request body or an internal config/DSL) into Eloquent query builder calls. This lets a PM greenlight "advanced filters," "saved views," or "dynamic segments" features where the filter set is data-driven rather than hardcoded per endpoint.
  • Build vs. buy: small-to-medium scope only. For a single internal admin screen or a handful of filterable resources, adopting this saves the days-to-weeks of writing and testing your own array-to-query translator. For anything resembling a public, general-purpose query API, treat this as a prototype accelerant rather than the production foundation—you'll likely outgrow it and should plan budget for a custom layer (or a Spatie/API-Platform-style alternative).
  • Roadmap: internal tooling and back-office velocity. The strongest fit is admin panels, reporting filters, and internal ops dashboards where the consumer is trusted staff, not anonymous users. It shortens time-to-ship on "let ops slice the data themselves" requests that otherwise queue behind engineering.
  • Use cases that map cleanly: saved filter presets stored as JSON, config-driven list endpoints, multi-tenant admin consoles, and translating a stored "view definition" into a live query. Use cases that do not map well: full-text search, complex analytical aggregation, or anything where query shape must be provably bounded.
  • Risk-informed decision input: last release was August 2020 and the project has ~18 stars. That is a maintenance and bus-factor signal, not a functionality signal. A PM should factor in an explicit "we own this if it breaks" line item and prefer pinning a version and wrapping it behind an internal interface.
  • Sequencing implication: because it is a thin translation layer over Eloquent, it is cheap to replace later if you isolate it. That makes it a reasonable "ship the feature now, revisit in two quarters" bet—but only if engineering agrees to the wrapper.

When to Consider This Package

Adopt when most of these hold:

  • Your filters arrive as structured arrays/JSON (from a request body, a stored config, or an internal DSL) and you want them turned into Eloquent constraints without hand-writing a parser per model.
  • The audience is trusted. Internal admins, ops, or authenticated staff—users who won't deliberately probe for injection or pathological queries.
  • The filter surface is modest. Equality, comparison, IN, null checks, simple relations—not multi-level boolean algebra with arbitrary nesting.
  • You can accept the maintenance posture. Last release 2020, low star count, small community. You are comfortable treating the source as something you may fork or vendor.
  • You will wrap it. Engineering can put it behind your own QueryFilter/FilterService interface so swapping it out later is a contained change.

Look elsewhere or build your own when:

  • The query surface is user-facing or semi-public. You need allowlists, per-field authorization, complexity/深度 limits, and query-cost estimation. Those are product requirements the package won't enforce for you, and they matter more than the parsing convenience.
  • You need a maintained dependency. If your org requires active security patching or an SLA for third-party code, the 2020 release date is a blocker regardless of quality.
  • Your queries are analytical. Aggregations, window functions, or reporting warehouse access—Eloquent and array-to-query translation are the wrong tool.
  • The array shapes are highly bespoke. If your filter semantics are unusual, you'll spend more time bending the package than writing 200 lines yourself.
  • You already have a query-builder abstraction. Adopting a second one creates two ways to do the same thing; the cognitive cost usually exceeds the savings.

Practical adoption gate: require a short engineering spike (a day or two) that confirms the array grammar covers 80%+ of your intended filters and that the wrapper interface is viable. If the spike fails, the fallback is a small in-house translator, not a bigger commitment to this package.

How to Pitch It (Stakeholders)

For executives — the one-paragraph version: We have recurring requests for flexible filtering in our internal tools—"let the ops team build their own views instead of filing tickets." This open-source package lets us ship that class of feature in days instead of weeks by converting a stored filter definition directly into a database query. The trade-off is maturity: it's a small, low-activity project last updated in 2020, so we'd treat it as a component we own rather than a vendor we depend on, pin the version, and keep it behind an internal interface so we can replace it later without touching product code. Recommendation: approve for internal, admin-facing features; do not use it as the basis for a public or customer-facing query API. Cost is effectively zero in licensing and low in integration; the real cost is a small amount of ongoing ownership.

For engineering — the honest framing: It's a thin, single-purpose translator from associative arrays to Eloquent calls. Not a query language, not a security layer. Last release August 2020, ~18 stars—so assume no upstream fixes and plan to vendor/fork if it becomes load-bearing. Two conditions for adoption: (1) it sits behind our own filter service interface with tests at that boundary, and (2) every field it can touch is explicitly allowlisted and authorized by us, never derived from raw user input. If the spike shows the array grammar can't express our roadmap filters, we write the translator ourselves—it's a small piece of code and we keep full control. Best fit: internal admin and reporting filters. Wrong fit: anything analytics-heavy or publicly exposed.

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.
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
hsluv/hsluv
seampact/codegen