所以我需要找到所有ProductionTask确定belongTo的Operation如果
- 在哪里
'status', '<', 3 orWhere('expected_start', '>', $monday_date)
与执行orWhere列operation_id从雄辩的关系与Operation被忽略。
我该怎么办?
这是错误的代码:
return production\ProductionTask::where('operation_id', $operation->id)->where('status', '<', 3)->orWhere('expected_start', '>', $monday_date)->and('expected_end', '<', $sunday_date)->get();