Пример #1
0
 public function exitClassroom(ExitClassroomRequest $request)
 {
     $input = $request->all();
     $student = student();
     $student->classrooms()->detach($input['classroom_id']);
     event(new StudentExitClassroom(Classroom::find($input['classroom_id']), $student, new User()));
     return redirect()->route('students.profile.classrooms.index');
 }
Пример #2
0
 public function exitClassroom(ExitClassroomRequest $request)
 {
     $input = $request->all();
     $student = student();
     $student->classrooms()->detach([$input['classroom_id'] => ['student_id' => $request->input('student_id')]]);
     event(new StudentExitClassroom(Classroom::find($input['classroom_id']), $student, new User()));
     return redirect()->route('students.subjects.classrooms', $request->input('student_id'));
 }