From ae7bd47b7fc6916681cc8139b47febb85fb2d508 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Wed, 16 Jul 2025 14:50:34 +0800 Subject: [PATCH] update --- app/Http/Controllers/Mobile/CourseController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/Mobile/CourseController.php b/app/Http/Controllers/Mobile/CourseController.php index 5cfe01b..521c0f6 100755 --- a/app/Http/Controllers/Mobile/CourseController.php +++ b/app/Http/Controllers/Mobile/CourseController.php @@ -21,6 +21,7 @@ use App\Models\Notice; use App\Models\Order; use App\Models\User; use EasyWeChat\Factory; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Validator; @@ -814,6 +815,11 @@ class CourseController extends CommonController if ($validator->fails()) { return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]); } + $startDate = Carbon::parse($all['month'])->startOfMonth(); + $endDate = Carbon::parse($all['month'])->endOfMonth(); + dd($startDate,$endDate); + + $list = Calendar::with('course', 'courseContent')->where('date', 'like', $all['month'] . '%')->orderBy('date')->get(); return $this->success($list); }