fix: 教师端课程只显示发布的

This commit is contained in:
Dai 2025-01-15 21:30:06 +08:00
parent 43f6afd8a5
commit 9c733dba91

View File

@ -92,7 +92,7 @@ class TeacherScheduleTimeService
} }
$data = $request->get(); $data = $request->get();
$schedule = TeacherScheduleTime::order('id desc')->where(['teacher_id' => $teacher->id]); $schedule = TeacherScheduleTime::order('id desc')->where(['teacher_id' => $teacher->id, 'is_publish' => 1]);
if (isset($data['month']) && !empty($data['month'])) { if (isset($data['month']) && !empty($data['month'])) {
$schedule->where('month', $data['month']); $schedule->where('month', $data['month']);
} }