I have below query
$tasks = Task::where('deleted_at', null)->where('status',0); $tasks = $tasks->orWhereIn('id',$task_ids);
SELECT * FROM `tasks` WHERE `deleted_at` IS NULL AND `status` = 0 OR `id` IN (80,101,107,112,113,133,134,184) ORDER BY `id` DESC
Problem is there are some task ids (113,133,134) who status =2. I want only to get all records of status =0 even it is IN condition.