Introduction
Basics
- Installation
- Make Model Filterable
- Filtering Models
- Allowing Filters
- Relationships
Available Filters
- Full Filter List
- Field Filters
- Relation Filters
- Morph Relation Filters
- Condition Filters
Digging Deeper
Field Filters
Less Than Equal To
Definition
Filter::field('age', [FilterType::LESS_THAN_EQUAL_TO])
Array/Object Structure
Example
$filter = [
'type' => '$lte',
'target' => 'age',
'value' => 18,
];
$sql = Person::filter([$filter])->toRawSql();
SQL
select * from "people" where "people"."age" <= 18
Modifiers
None available.
Assistant
Responses are generated using AI and may contain mistakes.