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