laravel 5.4中未经验证的函数
我的App/Exceptions/Handler.php看起来像laravel 5.4中未经验证的函数,laravel,laravel-5.4,Laravel,Laravel 5.4,我的App/Exceptions/Handler.php看起来像 protected function unauthenticated($request, AuthenticationException $exception) { if ($request->expectsJson()) { return response()->json(['error' => 'Unauthenticated.'], 401);
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
我是一个完全的新手,所以请对我温和一些:(你的
客户使用什么中间件。登录路线?你能显示你的路线文件吗?发布你的路线文件。