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); }