/** * Handle a POST request to reset a user's password. * * @return Response */ public function postReset() { $credentials = Input::only('email', 'password', 'password_confirmation', 'token'); Password::validator(function ($credentials) { return true; }); $response = Password::reset($credentials, function ($user, $password) { $user->password = Hash::make($password); $user->save(); }); switch ($response) { case Password::INVALID_PASSWORD: case Password::INVALID_TOKEN: case Password::INVALID_USER: return Redirect::back()->with('error', Lang::get($response)); case Password::PASSWORD_RESET: return Redirect::route('login')->with('error', Lang::get($response)); } }