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