/** * 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); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $teams = Teams::all(); return response()->json($teams); }