I want to write more than one condition where in controller. How can I solve this? For example :
$query = $query->where(function ($q,$request) { $q->where('product_name', 'like', '%'.$request->get('q').'%')->orWhere('product_id','like', '%'.$request->get('q').'%')->get();});