Weave Code
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

Query Filter Laravel Package

laravie/query-filter

Laravie Query Filter adds a clean, reusable way to filter Eloquent queries from request input. Define filter classes and apply them to models to handle searching, sorting, and conditional constraints without cluttering controllers or repositories.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development: Accelerates implementation of advanced filtering capabilities (e.g., multi-criteria search, dynamic query building) without reinventing the wheel. Reduces backend complexity for teams building data-heavy applications (e.g., dashboards, admin panels, or public-facing search tools). New: Now explicitly supports Laravel 11, aligning with teams adopting the latest framework version and enabling seamless integration into new projects or migrations.
  • Roadmap Prioritization: Enables faster iteration on MVP features requiring robust filtering (e.g., "Add user search with 10+ filters in 2 sprints"). Justifies outsourcing query logic to a maintained package instead of custom solutions. New: Laravel 11 support reduces friction for teams planning to upgrade, making it a lower-risk choice for long-term roadmaps.
  • Build vs. Buy: Avoids the cost of maintaining a custom query-filtering system, especially for teams with limited backend resources. MIT license reduces legal friction for commercial use. New: Laravel 11 compatibility broadens adoption potential for enterprises or startups already committed to or planning to migrate to Laravel 11.
  • Use Cases:
    • Admin Panels: Filtering records by status, date ranges, or custom metadata (e.g., "Show inactive users from Q1 2024").
    • Public APIs: Dynamic filtering for client-driven queries (e.g., e-commerce product listings with ?price_min=50&category=electronics).
    • Analytics Tools: Complex aggregations with conditional filters (e.g., "Revenue by region where order_status = 'completed'").
    • Legacy System Modernization: Retrofitting filtering to existing Eloquent queries without rewriting core logic.
    • New Project Initiatives: Ideal for greenfield projects built on Laravel 11, ensuring filtering capabilities are available from day one without compatibility concerns.

When to Consider This Package

Adopt if:

  • Your Laravel app requires reusable, maintainable filtering logic across multiple models/controllers.
  • You need to support dynamic, user-defined filters (e.g., API endpoints or admin UIs with toggleable criteria).
  • Your team lacks bandwidth to build and test a custom query builder from scratch.
  • You’re using Eloquent and want to avoid raw SQL for filter logic (reduces SQL injection risks).
  • The package’s MIT license aligns with your project’s legal/compliance needs.
  • New: You are using or planning to migrate to Laravel 11, as this package now includes official support for the latest framework version.

Look elsewhere if:

  • You require real-time filtering (e.g., live search with WebSockets) – this package is request-based.
  • Your filters involve non-Eloquent data sources (e.g., MongoDB, GraphQL, or external APIs).
  • You need extremely high performance for massive datasets (consider caching layers or database-specific optimizations).
  • Your filtering logic is highly bespoke (e.g., custom full-text search with Elasticsearch) and the package lacks extensibility.
  • You’re using Laravel 11 features that conflict with the package’s dependencies (verify compatibility post-release, as this is a new addition).
  • You are not using Laravel 11 and are unwilling to upgrade, as prior versions (e.g., Laravel 10) may lack full feature parity or optimizations.

How to Pitch It (Stakeholders)

For Executives: "This package now includes official Laravel 11 support, making it the ideal choice for teams building or migrating to the latest framework version. It lets us ship advanced filtering features—like those in tools such as Notion or Shopify—without hiring specialized backend talent or spending months on custom development. For example, we could add a 'filter by 10+ criteria' feature to our admin dashboard in weeks, not months. It’s like plugging in a pre-built, scalable search engine for our database, reducing development time by ~50% while improving reliability. The MIT license ensures no hidden costs, and its recent updates (including Laravel 11 compatibility) guarantee long-term viability for our roadmap."

For Engineering Teams: *"Laravie/query-filter v4.1.0 now supports Laravel 11, which is a game-changer for teams using or planning to adopt the latest framework. Key benefits remain:

  • DRY compliance: Centralize filter logic (e.g., applyFilters($request)) instead of duplicating where() clauses across controllers.
  • API-friendly: Automatically sanitizes and applies input filters (reduces SQL injection risks).
  • Extensible: Supports custom filter types (e.g., DateRange, MultiSelect) via service providers.
  • Low overhead: ~75 stars and recent updates (now including Laravel 11) suggest a stable, community-backed solution.

Tradeoffs:

  • We’d need to standardize on its filter syntax (e.g., ?status[]=active&status[]=pending), but the payoff is faster development and fewer bugs.
  • For Laravel 11 projects, this is now a low-risk, high-reward choice. Let’s prototype it for [high-priority feature X] and compare it to our current approach or alternatives like Spatie’s packages."

For Design/UX Teams: *"This package’s Laravel 11 support means we can now confidently build powerful, flexible search/filter UIs for both new and upgraded projects without backend bottlenecks. For example:

  • Admin tools: Combine filters like 'Created in 2024' + 'Priority: High' seamlessly in Laravel 11-based dashboards.
  • Public features: Support URL-based filters (e.g., /products?category=books&price_max=30) for better SEO and shareability in Laravel 11 apps. No more waiting for backend to implement each filter—we can iterate on UX faster, especially in greenfield projects or migrations to Laravel 11."*
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity