IP Address Service¶
The IP Address service contains methods for performing actions on IP Addresses. Example call:
$ip_address = ee('IpAddress')->anonymize($ip_address);
Anonymizes an IPv4 or IPv6 IP Address by using a subnet mask of
ffff:ffff:ffff:ffff:0000:0000:0000:0000respectively. Useful for when you need to remove the specificity of an IP address but still retain general geographic information.
- $address (string) – IP address that must be anonymized
The anonymized IP address. Returns an empty string when the IP address is invalid.