A powerful and flexible Laravel package for advanced, clean, and scalable filtering of Eloquent models using multiple customizable engines.
Filterable lets you build highly customizable filtering logic for Laravel's Eloquent queries without messy conditions. With support for multiple engines like:
- Ruleset Engine
- Invokable Engine
- Expression Engine
- Tree Engine
...you can structure your filter logic however you like — from simple lists to deeply nested conditional trees with relationship support.
- Multiple Filtering Engines
- Chainable & Nested Filter Logic
- Relation & Nested Relation Filtering
- Custom Operators & Sanitization
- SOLID & Extensible Design
- Zero-Config Optional Defaults
For full documentation, installation, and usage examples, visit: https://kettasoft.github.io/filterable
composer require kettasoft/filterable
Use it in your controller:
$posts = Post::filter(new PostFilter)->paginate();
Create your PostFilter using your preferred engine.
License
MIT © 2024-present Kettasoft