@php
$currentCountry = session('country');
$countryCode = is_object($currentCountry) ? strtolower($currentCountry->iso2 ?? '') :
(is_array($currentCountry) ? strtolower($currentCountry['iso2'] ?? '') : '');
$flagPath = !empty($countryCode) ? "assets/img/flags/{$countryCode}.png" : "";
$currentFlag = (!empty($flagPath) && file_exists(public_path($flagPath)))
? static_asset($flagPath)
: static_asset("landing/Flag_of_Turkey.svg.png");
@endphp
{{ $currentCountry->iso2??'' }}
@foreach (\App\Models\Country::where('status', 1)->get() as $country)
@php
$flag = file_exists(public_path("assets/img/Country/{$country->iso2}.png"))
? static_asset("assets/img/flags/{$country->iso2}.png")
: static_asset("landing/Flag_of_Turkey.svg.png");
@endphp
-
{{ $country->name }}
@endforeach
{{ \App\Models\Language::where('code', $locale)->value('name') ?? 'English' }}
@foreach (\App\Models\Language::where('status', 1)->get() as $language)
-
{{ $language->name }}
@endforeach
@php
$currencies = \App\Models\Currency::where('status', 1)->get();
$currentCurrency = getCurrency(session('currency_id'));
@endphp
{{ $currentCurrency?->code }}
@foreach ($currencies as $currency)
-
{{ $currency->code }}
@endforeach