@extends('site.layouts.master') @section('seoTags') @seoTags() @endsection @php $seo = SEO\Models\Page::where('path', URL::full())->first(); $lastSegment = request()->query('address'); if (strpos($lastSegment, 'ا') > 0 || strpos($lastSegment, 'ب') > 0 || strpos($lastSegment, 'س') > 0 || strpos($lastSegment, 'ج') > 0 || strpos($lastSegment, 'ي') > 0 || strpos($lastSegment, 'alayjar') > 0 || strpos($lastSegment, 'llbyaa') > 0) { app()->setLocale('ar'); } if (LaravelLocalization::getCurrentLocale() == 'ar') { $Ttype = 'وحدتك'; $Ttypea = 'وحدات'; } else { $Ttype = 'your unit'; $Ttypea = 'units'; } LaravelLocalization::getCurrentLocale() == 'ar' ? ($Tsubtype = 'العقارات') : ($Tsubtype = 'properties'); $Tcompound = null; $Tlocation = null; if (LaravelLocalization::getCurrentLocale() == 'ar') { $Tend = ", شاهد $Ttype الان"; } else { $Tend = ", view $Ttype now"; } if (LaravelLocalization::getCurrentLocale() == 'ar') { $Tmid = ", يمكنك عرض $Tsubtype و التواصل مع احد خبراء ريماكس المهاجر"; } else { $Tsubtype != 'properties' ? ($newTsubtype = 'the ' . $Tsubtype) : ($newTsubtype = $Tsubtype); $Tmid = ", you can view $newTsubtype and contact with one of remax elmohager agents"; } if (LaravelLocalization::getCurrentLocale() == 'ar') { $Tstart = "نقدم لك مجموعة من افضل $Tsubtype"; } else { $Tsubtype != 'properties' ? ($nTsubtype = $Tsubtype . 's') : ($nTsubtype = $Tsubtype); $Tstart = "we present to you a collection of best $nTsubtype"; } if ($Tcompound != null || $Tlocation != null) { $in = __('site.In'); } else { $in = null; } $desArr = [$Tstart, $in, $Tcompound, $Tlocation, $Tmid, $Tend]; $description = ''; foreach ($desArr as $des) { if ($des != null) { if (end($desArr) == $des) { $description .= $des; } else { $description .= $des . ' '; } } } if (LaravelLocalization::getCurrentLocale() == 'en') { $compoundTitle = 'Compounds'; } if (LaravelLocalization::getCurrentLocale() == 'ar') { $compoundTitle = 'كمبوندات'; } $seoRow = App\SeoPages::where('path', url()->current())->first(); if($seoRow == null) $seoRow = ''; if(count(request()->segments()) == 3){ $mcom = App\Compound::where('compound_name_en', str_replace('-', ' ', request()->segments()[2])) ->orWhere('compound_name_ar', str_replace('-', ' ', request()->segments()[2])) ->first(); }else{ $mcom = App\Compound::where('compound_name_en', str_replace('-', ' ', request()->segments()[1])) ->orWhere('compound_name_ar', str_replace('-', ' ', request()->segments()[1])) ->first(); } $seoRow = App\SeoPages::where('path', url()->current())->first(); if ($seoRow == null) { $seoRow = ''; } if ($lastSegment == 'custom-search') { $user = auth()->guard('web')->user()?->id; } else { $user = 'none'; } if (!isset($landingPage)) { $landingPage = (object) ['slug_en' => null, 'slug_ar' => null]; } if (count(request()->segments()) == 3) { $com_name = request()->segments()[2]; } else { $com_name = request()->segments()[1]; } // Apply all replacements sequentially $com_name = str_replace('-cities', '', $com_name); $com_name = str_replace('-compounds', '', $com_name); $com_name = str_replace('-districts', '', $com_name); $com_name = str_replace('-مدن', '', urldecode($com_name)); $com_name = str_replace('-احياء', '', urldecode($com_name)); $com_name = str_replace('-كمبوندات', '', urldecode($com_name)); $com_name = str_replace('-', ' ', trim($com_name)); $com = App\Compound::where('compound_name_en', $com_name)->orWhere('compound_name_ar', $com_name)->first(); if(empty($com))$dis = App\District::where('district_name_en', $com_name)->orWhere('district_name_ar', $com_name)->first(); if(empty($dis))$cit = App\City::where('city_name_en', $com_name)->orWhere('city_name_ar', $com_name)->first(); if(empty($cit))$gov = App\Governorate::where('governorate_name_en', $com_name)->orWhere('governorate_name_ar', $com_name)->first(); if (!empty($cit) && (str_contains(url()->current(),'compounds') || str_contains(urldecode(url()->current()),'كمبوندات'))) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_en.'/'.$cit->city_name_en.'-compounds'); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_ar.'/'.$cit->city_name_ar.'-كمبوندات'); } } if (!empty($cit) && (str_contains(url()->current(),'districts') || str_contains(urldecode(url()->current()),'احياء'))) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_en.'/'.$cit->city_name_en.'-districts'); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_ar.'/'.$cit->city_name_ar.'-احياء'); } } if (!empty($gov)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', 'govs/'.$gov->governorate_name_en.'-cities'); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', 'govs/'.$gov->governorate_name_ar.'-مدن'); } } if(urldecode(url()->current()) == 'https://www.nileestate.com/ar/المحافظات' || urldecode(url()->current()) == 'https://nileestate.com/ar/المحافظات'){ $opposite_slug = 'govs'; }elseif(url()->current() == 'https://nileestate.com/en/govs'){ $opposite_slug = 'المحافظات'; } if(!isset($opposite_slug)) return redirect('/'); @endphp @section('metatags') @if(!empty($seoRow)) @endif @if((str_contains(url()->current(), '/govs') || str_contains(urldecode(url()->current()), '/المحافظات' )) && count(request()->segments()) == 2) @else @endif @endsection @if (empty($seoRow->title)) @section('title') @if (Route::is('site.gov-cities') || Route::is('site.ar-gov-cities')) @lang('site.gov-city') @elseif(str_contains(url()->current(),'-cities') || str_contains(urldecode(url()->current()),'مدن')) @lang('site.city-district'){{ ' ' . ($areas[0]['governorate'] ?? '') }} @elseif(str_contains(url()->current(),'-districts') || str_contains(urldecode(url()->current()),'احياء')) @lang('site.district-compound'){{ ' ' . $dists[0]['city'] }} @elseif(str_contains(url()->current(),'-compounds') || str_contains(urldecode(url()->current()),'كمبوندات')) @lang('site.coms'){{ ' ' . $comps[0]['district'] }} @endif @endsection @endif @section('content') @if (isset($areas))
@if(isset($areas[0]['governorate'])) @if(app()->getLocale() == 'ar') {{ Breadcrumbs::render($areas[0]['governorate'].'-مدن') }} @else {{ Breadcrumbs::render($areas[0]['governorate'].'-cities') }} @endif @endif
@elseif(isset($dists))
@if(app()->getLocale() == 'ar') @if(Breadcrumbs::exists($dists[0]['city'].'-أحياء')) {{ Breadcrumbs::render($dists[0]['city'].'-أحياء') }} @else {{ Breadcrumbs::render('المحافظات') }} @endif @else @if(Breadcrumbs::exists($dists[0]['city'].'-districts')) {{ Breadcrumbs::render($dists[0]['city'].'-districts') }} @else {{ Breadcrumbs::render('Governorates') }} @endif @endif
@elseif(isset($comps))
@if(app()->getLocale() == 'ar') @if(Breadcrumbs::exists($comps[0]['district'].'-كمبوندات')) {{ Breadcrumbs::render($comps[0]['district'].'-كمبوندات') }} @else {{ Breadcrumbs::render('المحافظات') }} @endif @else @if(Breadcrumbs::exists($comps[0]['district'].'-compounds')) {{ Breadcrumbs::render($comps[0]['district'].'-compounds') }} @else {{ Breadcrumbs::render('Governorates') }} @endif @endif
@else @if(app()->getLocale() == 'ar')
{{ Breadcrumbs::render('المحافظات') }}
@else
{{ Breadcrumbs::render('Governorates') }}
@endif @endif {!! $breadcrumbSchema !!} {!! $blogPostSchema !!}
@lang('site.Filter Results')
@lang('site.wherecanlive')

@if (Route::is('site.gov-cities') || Route::is('site.ar-gov-cities')) @lang('site.gov-city') @elseif(str_contains(url()->current(),'-cities') || str_contains(urldecode(url()->current()),'مدن')) @lang('site.city-district'){{ ' ' . ($areas[0]['governorate'] ?? '') }} @elseif(str_contains(url()->current(),'-districts') || str_contains(urldecode(url()->current()),'احياء')) @lang('site.district-compound'){{ ' ' . $dists[0]['city'] }} @elseif(str_contains(url()->current(),'-compounds') || str_contains(urldecode(url()->current()),'كمبوندات')) @lang('site.coms'){{ ' ' . $comps[0]['district'] }} @endif

@if (isset($govs)) @foreach ($govs as $gov)

{{ $gov['name'] }}

@endforeach @elseif(isset($areas)) @foreach ($areas as $area)

{{ $area['name'] }}

@endforeach @elseif(isset($dists)) @foreach ($dists as $dist)

{{ $dist['name'] }}

@endforeach @elseif (isset($comps)) @foreach ($comps as $comp)

{{ $comp['name'] }}

@if ($comp['properties'] > 0)

{{ $comp['properties'] . ' ' . __('site.Property') }}

@endif
@endforeach @endif
@if ($seoRow != null) @php if (LaravelLocalization::getCurrentLocale() == 'ar') { $content = $seoRow->content_ar; } else { $content = $seoRow->content; } @endphp @if (!empty($content))
{{--
{{__('site.see_more')}}
--}}
@endif @endif @endsection @section('script')