|string> */ public function rules(): array { return [ 'name' => 'required|string|max:255', 'type' => ['required', Rule::in(TypeLesson::cases())], 'lesson_date' => 'required|date', 'grade_id' => 'required|exists:grades,id', 'teacher_id' => 'required|exists:teachers,id', 'subject_id' => 'required|exists:subjects,id', ]; } }