简体   繁体   English

Laravel身份验证:本地主机将您多次重定向laravel 5.3

[英]Laravel authentication: localhost redirected you too many times laravel 5.3

Sorry if this question have already existsed. 抱歉,这个问题已经存在。 I'm building web application with Laravel framework and version is 5.3. 我正在使用Laravel框架构建Web应用程序,版本是5.3。 I have a problem that you can help me. 我有一个问题,您可以帮助我。 It's redirected you too many times when authentication. 身份验证时,它重定向了您太多次。

My route : 我的路线

Route::get('/', [
'as' => 'ui.home',
'uses' => 'HandleController@home'
]);
Auth::routes();

My middleware : 我的中间件

public function handle($request, Closure $next)
{
    if (!Auth::check()) {
        return redirect('/login');
    }

    return $next($request);
}

I see a problem cause from Auth::check() . 我从Auth::check()看到问题原因。 But, I can't fixed it. 但是,我无法修复它。 Please help me. 请帮我。

Thank you, 谢谢,

may be the permission issue to the storage folder 可能是存储文件夹的权限问题

sudo chmod -R 777 storage/

ps: if you are in linux ps:如果您在Linux中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM