@php
$categories = App\Models\ListingCategory::where('language_id', $language->id)
->where('status', 1)
->get();
@endphp
@php
$Countries = App\Models\Location\Country::where('language_id', $language->id)->get();
$totalCountry = $Countries->count();
@endphp
@if ($totalCountry > 0)
@endif
@php
$States = App\Models\Location\State::where('language_id', $language->id)->get();
$totalState = $States->count();
$Stateshave = App\Models\Location\State::where([
['language_id', $language->id],
['country_id', $listingContent ? $listingContent->country_id : 0],
])->get();
$totalStateshave = $Stateshave->count();
@endphp
@if ($totalState > 0)
@endif
@php
$cities = App\Models\Location\City::where('language_id', $language->id)->get();
$totalCity = $cities->count();
@endphp
@if (is_array($permissions) && in_array('Amenities', $permissions))
@php
$aminities = App\Models\Aminite::where('language_id', $language->id)->get();
$hasaminitie = $listingContent ? json_decode($listingContent->aminities) : [];
@endphp
@endif
@php $currLang = $language; @endphp
@foreach ($languages as $language)
@continue($language->id == $currLang->id)
@endforeach