laravel5.8 front desk auth login cannot
不是一般的人
不是一般的人 2020-05-12 18:17:04
0
4
2134

I am a student in the eighth phase of the PHP online class. I followed the laravel auth video of Teacher Ximen to expand a front-end login function. However, after the login process was completed, the transfer to the next page was intercepted by the middleware, and there was no error in the code execution. Just got intercepted. The following is the code. Please help me see it

不是一般的人
不是一般的人

reply all (3)
殘留の回憶

F12, you can view the specific information that was intercepted in the network, there is a specific error status code, the comparison reports 419, that is, the csrf verification failed

  • reply There is no error. It seems that the logic is reversed somewhere, or there is no session in the system after logging in.
    不是一般的人 author 2020-05-13 13:22:37
不是一般的人

登录.jpg

扩展.png

模型.png中间件.jpg注册中间件.jpg

    不是一般的人

    这个中间件

    guest()){ if($request->ajax()){ return response('error',401); } return redirect()->guest('/?login=1'); } return $next($request);}}?>

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!