首页 > 解决方案 > 在 laravel 中使用 Intented 时主页会重新加载两次

问题描述

我试图在laravel中使用意图在login后重定向回预期位置,但是当我尝试访问主页(即:登录页面)时,页面加载了两次。

  protected function sendLoginResponse(Request $request)
{
    $this->clearLoginAttempts($request);

    if($this->guard()->user()->role == 'ADMIN') {

        return Redirect::intended();

    }   

标签: phplaravel

解决方案


推荐阅读