/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $user = User::find($id); if ($user->ownedBy($id)) { return view('user.edit')->withData($this->user->getById($id)); } \Session::flash('message', 'You do not have access to this profile!'); return redirect('home'); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { return view('roles.edit')->withRoles(Role::find($id))->withPermissions(Permission::all())->withUsers(User::all()); }
public function listUserAndZone() { $data = $this->model->userTotals(); return $data; }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }