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
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
这个中间件
guest()){ if($request->ajax()){ return response('error',401); } return redirect()->guest('/?login=1'); } return $next($request);}}?>