route('organization'); if (! $organization || empty($organization->allowed_ip_ranges)) { return $next($request); } if (IpUtils::checkIp($request->ip(), $organization->allowed_ip_ranges)) { return $next($request); } abort(403, 'Your IP address is not permitted to access this organization.'); } }