@php
$registerLocationCountries = [];
foreach ([
resource_path('data/countriesAndStates.json'),
public_path('assets/data/countriesAndStates.json'),
storage_path('app/geo/countriesAndStates.json'),
public_path('data/countriesAndStates.json'),
] as $countriesPath) {
if (is_readable($countriesPath)) {
$decoded = json_decode(file_get_contents($countriesPath), true);
if (is_array($decoded) && count($decoded) > 0 && array_keys($decoded) !== range(0, count($decoded) - 1)) {
$registerLocationCountries = $decoded;
break;
}
}
}
@endphp
@if(count($registerLocationCountries) > 0)
@endif