@php
$allowedIp ??= null;
$typedAddresses = old('ip_addresses');
$typedAddresses = is_array($typedAddresses) ? implode("\n", $typedAddresses) : (string) $typedAddresses;
// Errors for the list come back per line ("ip_addresses.2"), so gather them under the one field.
$addressErrors = collect($errors->getMessages())
->filter(fn ($messages, $field) => $field === 'ip_addresses' || str_starts_with($field, 'ip_addresses.'))
->flatten()
->unique()
->all();
@endphp
{{ __('You are on :ip right now.', ['ip' => $currentIp]) }}
{{ __('You are on :ip right now. Every address here gets the place name below.', ['ip' => $currentIp]) }}