$visitor->ip()
Sets the ip address if provided or returns the ip of the current visitor otherwise
$visitor->ip(string|null $ip = null, bool $hash = false): Kirby\Http\Visitor|string|null
Parameters
| Name | Type | Default |
|---|---|---|
| $ip | stringornull |
null
|
| $hash | bool |
false
|
Return types
Kirby\Http\Visitororstringornull
This method modifies the existing $visitor object it is applied to and returns it again.