has('login') && !Auth::check()) { return response('Unauthorized.', 401) ->header('WWW-Authenticate', 'Basic realm="Please enter your email and password"'); } return $next($request); } }