用户登录后,进入系统,因长时间放置,用户失效,中间件重定向到登录界面,再重新登录的时候抛异常TokenMismatchException,底层代码如下:
public function handle($request, Closure $next)
{
if ($this->isReading($request) || $this->shouldPassThrough($request) || $this->tokensMatch($request)) {
return $this->addCookieToResponse($request, $next($request));
}
throw new TokenMismatchException;
}