草庐IT

php - Laravel whereIn 或 whereIn

我正在通过过滤器搜索产品:我的代码:->where(function($query)use($filter){if(!empty($filter)){foreach($filteras$key=>$value){$f=explode(",",$value);$query->whereIn('products.value',$f);}}})查询:and(products.valuein(Bomann,PHILIPS)andproducts.valuein(red,white))但我需要:and(products.valuein(Bomann,PHILIPS)ORproducts.valu
12