php - 在 laravel 中使用 Intented 时主页会重新加载两次
问题描述
我试图在laravel中使用意图在login后重定向回预期位置,但是当我尝试访问主页(即:登录页面)时,页面加载了两次。
protected function sendLoginResponse(Request $request)
{
$this->clearLoginAttempts($request);
if($this->guard()->user()->role == 'ADMIN') {
return Redirect::intended();
}
解决方案
推荐阅读
- python - Python - 按具有容差的时间段分组
- c# - 如何清理 C# 中的非托管资源
- apache-spark - spark-submit 标准来设置参数值
- api - 使用 twilio 发送多条消息
- r - 是否可以使用相同的问题但在每个版本中使用不同的顺序来分析不同考试的项目表现?
- r - R中具有不同列数的两个矩阵之间的相关性
- google-apps-script - 使用 onChange 计算彩色单元格的数量
- text - PostScript - 使用卸载的字体生成文本
- javascript - Javascript没有立即执行,延迟到页面加载后一秒钟
- python - 返回前 5 个访问量最大的网站(堆、哈希表)- Python