コード例 #1
0
 /**
  * Reset a user's password.
  *
  * @param $token
  * @return $this|\Illuminate\Http\RedirectResponse
  */
 public function resetPassword($token)
 {
     $success = $this->repository->resetPassword($token);
     if (!$success) {
         return redirect()->back()->withErrors(['password_reset_failed' => Lang::get('auth.password_reset_failed')]);
     }
     return redirect()->route('auth.login')->with(['notice' => Lang::get('auth.password_reset_success')]);
 }