master
cody 3 weeks ago
parent 8c340c01a0
commit 3784a66e24

@ -144,12 +144,12 @@ class CourseSignController extends BaseController
if (isset($all['course_type_id'])) {
$course_type_id = explode(',', $all['course_type_id']);
$courses = Course::where(function ($query) use ($all) {
if (isset($all['start_date'])) {
$query->where('start_date', '>=', $all['start_date']);
}
if (isset($all['end_date'])) {
$query->where('start_date', '<=', $all['end_date']);
}
// if (isset($all['start_date'])) {
// $query->where('start_date', '>=', $all['start_date']);
// }
// if (isset($all['end_date'])) {
// $query->where('start_date', '<=', $all['end_date']);
// }
})->whereIn('type', $course_type_id)->get();
$query->whereNotIn('status', [4, 5])
->where(function ($query) use ($courses) {

Loading…
Cancel
Save