Ejemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param $id
  *
  * @return
  */
 public function edit($id)
 {
     $data['user'] = User::findOrFail($id);
     $data['departments'] = Departments::all();
     $data['teams'] = Teams::all();
     $data['countries'] = Countries::all();
     $data['roles'] = Role::all();
     return view('staff/edit_user', $data);
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $teams = Teams::all();
     return response()->json($teams);
 }