|
|
|
|
@ -272,7 +272,7 @@ class OtherController extends CommonController
|
|
|
|
|
foreach ($courseTypes as $courseType) {
|
|
|
|
|
// 获取课程
|
|
|
|
|
$courses2 = Course::where('type', $courseType->id)
|
|
|
|
|
->whereHas('course', function ($query) use ($start_date, $end_date) {
|
|
|
|
|
->where(function ($query) use ($start_date, $end_date) {
|
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|
if ($start_date && $end_date) {
|
|
|
|
|
$query->whereBetween('start_date', [$start_date, $end_date])
|
|
|
|
|
|