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
Not Like
Definition
Copy
Filter::field('description', [FilterType::NOT_LIKE])
Array/Object Structure
Example
Copy
$filter = [
'type' => '$notLike',
'target' => 'description',
'value' => 'Symfony',
];
Copy
$sql = Project::filter([$filter])->toRawSql();
SQL
Copy
select * from "projects" where "projects"."description" NOT LIKE '%Symfony%'
Modifiers
Start
Copy
select * from "projects" where "projects"."description" NOT LIKE 'Symfony%'
End
Copy
select * from "projects" where "projects"."description" NOT LIKE '%Symfony'
Assistant
Responses are generated using AI and may contain mistakes.