@php $index = $index ?? 0; $branch = $branch ?? []; $cities = $cities ?? collect(); $provinces = $provinces ?? collect(); $selectedCity = old("branches.$index.city_id", $branch['city_id'] ?? ($branch->city_id ?? '')); $matchedCity = collect($cities)->first(fn ($city) => (string) $city->id === (string) $selectedCity); $selectedProvince = old("branches.$index.province_id", $branch['province_id'] ?? ($matchedCity->province_id ?? '')); $latitude = old("branches.$index.latitude", $branch['latitude'] ?? ($branch->latitude ?? '')); $longitude = old("branches.$index.longitude", $branch['longitude'] ?? ($branch->longitude ?? '')); @endphp
{{ $latitude !== '' && $latitude !== null ? $latitude : '—' }}
Lng: {{ $longitude !== '' && $longitude !== null ? $longitude : '—' }}