我的App / Exceptions / Handler.php看起来像
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest(route('customer.login'));
}
每次我访问它时,我的浏览器都会显示此错误。
This page isn’t working
127.0.0.1 redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
我是一个完全的新手,所以请对我温柔:(