$attendances, 'classes' => $classes]); } public function add_attendance(Request $request) { $classes_id = $request->input('classes_id'); $student_id_number = $request->input('student_id'); $student_name = $request->input('student_name'); $student_surname = $request->input('student_surname'); $seat_number = $request->input('seat_number'); Attendance::create([ 'classes_id' => $classes_id, 'student_id_number' => $student_id_number, 'student_name' => $student_name, 'student_surname' => $student_surname, 'seat_number' => $seat_number, ]); return redirect(route('admin_attendances')); } public function delete_attendance($attendance_id) { Attendance::find($attendance_id)->delete(); return redirect(route('admin_attendances')); } public function edit_attendance($attendance_id) { Attendance::find($attendance_id); return redirect(route('admin_attendances')); } }