All projects

Open-source project

Filterable

Enhance Laravel queries with adaptable, customisable filters and intelligent caching to improve both performance and functionality.

196 stars10 forksPHP

About the project

Filterable is a Laravel package for turning HTTP request parameters into rich, composable Eloquent query filters. The base Filter class exposes a stateful pipeline that you can extend, toggle, and compose with traits to add validation, caching, logging, rate limiting, memory management, and more. Everything is opt-in, so you enable only the behaviour you need while keeping type-safe, testable filters.

Laravel 11.x, 12.x, or 13.x components ( illuminate/cache , illuminate/contracts , illuminate/database , illuminate/http , illuminate/support )

A configured cache store when you enable caching features

Problem

Filtering logic in Laravel applications can become repetitive, scattered, and difficult to test as APIs and dashboards grow.

Architecture

A Laravel-focused package that organizes request-driven filtering into explicit, reusable query behavior.

Design decisions

  • Move filtering behavior into reusable structures that keep controllers and query surfaces clean.
  • Support practical product query patterns without turning the package into an opaque query language.
  • Optimize for maintainability in data-heavy application code.

Constraints and lessons

Constraints

  • The package needs to fit Laravel conventions rather than fight them.
  • Flexibility has to be balanced against clear behavior and readable implementation.

Lessons

  • Reusable application patterns should remove repetition without hiding business intent.
  • Framework packages succeed when they feel native to the framework's existing habits.

Maintained as a Laravel package with ongoing public usage.