Basics
Filtering Models
Overview
Once you have made your model Filterable
.
You should pass filters to ::filter()
on the model.
$sql = Product::filter([
[
'target' => 'name',
'type' => '$eq',
'value' => 'TV',
],
])->toRawSql();
select * from "products" WHERE "products"."name" = 'TV'