@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
@if ($allowedIp)
{{ __('Use my current IP') }}

{{ __('You are on :ip right now.', ['ip' => $currentIp]) }}

@else
{{ __('Use my current IP') }}

{{ __('You are on :ip right now. Every address here gets the place name below.', ['ip' => $currentIp]) }}

@endif
@if ($allowedIp) @endif
{{ __('Cancel') }} @unless ($allowedIp) @endunless {{ $submitLabel }}