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:0000 respectively. Useful for when you need to remove the specificity of an IP address but still retain general geographic information.
||IP address that must be anonymized|
||The anonymized IP address. Returns an empty string when the IP address|