master
cody 1 week ago
parent bc19022fa2
commit 9a8e6beb52

@ -244,6 +244,7 @@ class OtherController extends CommonController
// 条件1有 course_id 时,通过关联的 course.type 匹配 // 条件1有 course_id 时,通过关联的 course.type 匹配
$query->where(function ($q) use ($course_type_id_array) { $query->where(function ($q) use ($course_type_id_array) {
$q->whereHas('course', function ($subQ) use ($course_type_id_array) { $q->whereHas('course', function ($subQ) use ($course_type_id_array) {
$subQ->whereIn('type', $course_type_id_array); $subQ->whereIn('type', $course_type_id_array);
}); });

Loading…
Cancel
Save