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 Bundle Laravel Package

artprima/query-filter-bundle

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API/Backend Standardization: Enables consistent filtering, sorting, and pagination across all Doctrine-based Symfony APIs, reducing ad-hoc query logic in controllers/repositories.
  • Developer Velocity: Accelerates feature delivery for search-heavy endpoints (e.g., dashboards, admin panels, public APIs) by abstracting complex query-building logic.
  • Roadmap Prioritization:
    • Build vs. Buy: Justifies not building a custom filtering solution for Symfony/Doctrine projects, saving ~3–6 months of dev effort.
    • Feature Flag: Ideal for enabling "advanced search" as a phased rollout (e.g., start with basic filters, later add complex connectors like OR logic).
  • Use Cases:
    • Admin Panels: Filter entities by multiple criteria (e.g., status=active AND created_after=2023-01-01).
    • Public APIs: Client-driven filtering (e.g., mobile apps, third-party integrations) with strict column validation.
    • Data Export Tools: Generate filtered CSV/Excel exports with pagination.
    • Legacy Migration: Modernize monolithic queries into modular, maintainable components.

When to Consider This Package

  • Adopt When:

    • Your Symfony app uses Doctrine ORM and requires dynamic query filtering (e.g., >5 endpoints with ad-hoc WHERE clauses).
    • You need client-controlled sorting/pagination (e.g., ?sortby=price&limit=50).
    • Your team spends >20% of backend time writing repetitive QueryBuilder logic.
    • You’re building a REST/GraphQL API with search-heavy endpoints (e.g., e-commerce filters, analytics dashboards).
    • You want to reduce SQL injection risks by validating filter columns/syntax server-side.
  • Look Elsewhere If:

    • You’re not using Symfony/Doctrine (e.g., Laravel, raw SQL, or NoSQL).
    • Your filtering needs are static (e.g., hardcoded queries in a CRUD app).
    • You require multi-field sorting (this bundle supports only one ORDER BY field).
    • Your team prefers Elasticsearch/Solr for full-text search (this is for SQL-based filtering).
    • You need real-time filtering (e.g., WebSockets); this is for HTTP request-based queries.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us standardize how our APIs handle search, sorting, and pagination—cutting backend dev time by 40% for features like product filters or admin dashboards. For example, instead of writing custom QueryBuilder logic for every endpoint, we configure once and reuse across the app. It also reduces security risks by validating all filter inputs server-side. Early adopters like [similar project X] saw a 30% reduction in API-related bugs. The MIT license means no vendor lock-in, and the Symfony ecosystem ensures long-term support."

For Engineers:

*"QueryFilterBundle replaces boilerplate Doctrine queries with a declarative config system. Key wins:

  • Consistency: One way to handle filtering/pagination across all APIs (no more copy-pasted QueryBuilder logic).
  • Flexibility: Supports basic (LIKE, =, >) and advanced filters (BETWEEN, IN, OR connectors).
  • Integration: Works seamlessly with FOSRestBundle/JMSSerializer for API-first projects.
  • Validation: Strict mode blocks invalid columns/sorts at runtime (e.g., filter[hacked_field] fails fast). Example: Replace this:
// Old way (repetitive)
$qb->andWhere('u.name LIKE :name')->setParameter('name', '%'.$search.'%');

With this:

// New way (declarative)
$config->setSearchAllowedCols(['u.name']);
$queryFilter->getData($config); // Handles the WHERE clause automatically.

Tradeoff: Limited to single-field sorting, but we can phase in later if needed."*

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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui