laravel advance where query builder
I have an advance where query and need to set operation for that like below but it's not working
$query->where(function($q) use($filter, $field){
$this->applyFilter($q, $filter, $field);
}, $filter->operation);
the $filter->operation could be one of or | and
how I could implement this know it just and the query
I found the way to handle this like below
where accept four parameter and the last one is boolean and the operator
$query->where(function($q) use($filter, $field){
$this->applyFilter($q, $filter, $field);
}, null, null, $filter->operation);
Please or to participate in this conversation.