public function updatePassword(EditPasswordRequest $request)
 {
     Auth::user()->fill(['password' => $request->all()['new_password']]);
     \Auth::user()->save();
     $request->session()->flash('edit_success', trans('home.messages.edit_suceed'));
     return redirect('/');
 }
Beispiel #2
0
 /**
  * Action for edit password
  *
  * @param EditPasswordRequest $request
  * @param $id
  * @return Response
  */
 public function postEditPassword($id, EditPasswordRequest $request)
 {
     $director = User::findOrFail($id);
     $director->password = \Hash::make($request->input('password'));
     $director->save();
     return redirect()->route('admin.director.index');
 }