Ejemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(User $user)
 {
     if ($user) {
         $president = HumanResource::president();
         $positions = Position::all();
         $departments = Department::department()->get();
         $institutes = Department::institute()->get();
         return view('user.api.edit')->with(compact('user', 'president', 'positions', 'departments', 'institutes'));
     } else {
         return false;
     }
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $departments = Department::department()->get();
     $institutes = Department::institute()->get();
     $positions = Position::all();
     return view('employee.index')->with(compact('departments', 'institutes', 'positions'));
 }