i create a nested query like this in laravel 10 :
$product->where(function ($query) use ($values) { $query->orWhereIn('properties.value', $values); }
here is the problem :
when i use $product->where (AND) , the $query->orWhereIn (OR) change to $query->whereIn (AND) by itselt (in results , in sql code)
when i use $product->orWhere , the $query->whereIn change to $query->orWhereIn by itselt (in results , in sql code)
it change my $query->orWhereIn (OR) condition to what ever $product->where (AND) is
i want $product->where and $query->orWhereIn inside it but laravel create a sql code with $query->whereIn !
it create a AND condition from my $query->orWhereIn code !!!!
how can i use $query->orWhereIn inside $product->where ?!?!?!?