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+.
Filter::field('age', [FilterType::BETWEEN]);
import TypeParameterField from '/snippets/type-parameter-field.mdx';
import TargetParameterField from '/snippets/target-parameter-field.mdx';
$filter = [
'type' => '$between',
'target' => 'age',
'value' => [18, 65,],
];
$sql = Person::filter([$filter])->toRawSql();
select * from "people" where "people"."age" between 18 and 65
None available.
How can I help you explore Laravel packages today?