📜  登录 laravel 后重定向到尝试的 url - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:33.340000             🧑  作者: Mango

代码示例1
The intended method on the redirector will redirect the user to the URL they
  were attempting to access before being intercepted by the authentication 
  middleware. A fallback URI may be given to this method in case the intended 
  destination is not available.
  
if (Auth::attempt($credentials)) {
  // Authentication passed...
  return redirect()->intended('dashboard');
}