indexzer0/eloquent-filtering
Define allowed filters on your Eloquent models and apply them from simple arrays or request data—no custom query logic. Supports complex, type-based filtering for APIs and dashboards on Laravel 10+ / PHP 8.2+.
/products?filters[0][target]=price&filters[0][type]=$gt&filters[0][value]=100) without manual query-building logic.=, >, LIKE, JSON path queries).spatie/laravel-geocoder).scout or meilisearch).For Executives: "This package cuts API/dashboard filtering development time by 60% by standardizing how we handle complex queries. For example, instead of writing custom SQL for every ‘price > $100’ request, we define rules once in the model. It’s MIT-licensed, actively maintained, and used by 200+ teams—reducing tech debt while scaling faster."
For Engineers:
*"Eloquent Filtering lets us replace spaghetti where() chains with declarative model-level rules. Example:
// Model
public function allowedFilters() {
return Filter::only(
Filter::field('price', [FilterType::GREATER_THAN]),
Filter::field('name', [FilterType::LIKE])
);
}
// API Request
$products = Product::filter(request('filters'))->get();
How can I help you explore Laravel packages today?