/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $faculty = Faculty::findOrFail($id); $faculty->delete(); Flash::Success('Faculty Deleted successfully.'); return redirect()->route('faculty.index'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $this->AuthorizeAndRedirect('admin'); $student = User::findOrFail($id); $student->delete(); Flash::Success('Student Deleted successfully.'); return redirect()->route('student.index'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $department = Department::findOrFail($id); $department->delete(); Flash::Success('Department Deleted successfully.'); return redirect()->route('department.index'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $this->AuthorizeAndRedirect('admin'); $lecturer = User::findOrFail($id); $lecturer->delete(); Flash::Success('Lecturer Deleted successfully.'); return redirect()->route('lecturer.index'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $course = Course::findOrFail($id); $course->delete(); Flash::Success('Course Deleted successfully.'); return redirect()->route('course.index'); }