Пример #1
0
 /**
  * @desc Edit Department
  * @Edit function Open Edit From view
  * @param Department $department (get department data from provider route model binding $router->model)
  * @param Specialty $specialty for parent specialty list
  * @param Subject $subject for parent subject list
  **/
 public function edit(Department $department, Specialty $specialty, Subject $subject)
 {
     $subjects = $subject->pluck('name', 'id')->toArray();
     $menu = $department->menu()->get();
     $specialties = $specialty->get();
     return view('academystructure::departments.edit', compact('department', 'menu', 'specialties', 'subjects'));
 }
Пример #2
0
 /**
  * @desc display list of faculties
  **/
 public function index(Specialty $specialty)
 {
     $specialties = $specialty->get();
     return view('academystructure::specialties.index', compact('specialties'));
 }