check()) { return $next($request); } else { return response()->json([ 'Unauthenticated.' ], 401); } } }