@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 = 'requests'); $Tcompound = null; $Tlocation = null; if (LaravelLocalization::getCurrentLocale() == 'ar') { $Tend = ", شاهد $Ttype الان"; } else { $Tend = ", view $Ttype now"; } if (LaravelLocalization::getCurrentLocale() == 'ar') { $Tmid = ", يمكنك عرض $Tsubtype و التواصل مع احد خبراء ريماكس المهاجر"; } else { $Tsubtype != 'requests' ? ($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 != 'requests' ? ($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) { $com_name = request()->segments()[2]; } else { $com_name = request()->segments()[1]; } // Apply all replacements sequentially $com_name = str_replace('-cities-requests', '', $com_name); $com_name = str_replace('-compounds-requests', '', $com_name); $com_name = str_replace('-districts-requests', '', $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-requests'); } 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-requests'); } 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-requests'); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', 'govs/'.$gov->governorate_name_ar.'-مدن-طلبات'); } } @endphp @section('metatags') @if(!empty($seoRow)) @endif @if((str_contains(url()->current(), '/govs-requests') || str_contains(urldecode(url()->current()), '/المحافظات-طلبات' )) && count(request()->segments()) == 2) @else @endif @endsection @if (empty($seoRow->title)) @section('title') @if (Route::is('site.gov-cities-requests') || Route::is('site.ar-gov-cities-requests')) @lang('site.gov-city-requests') @elseif(str_contains(url()->current(),'-cities-requests') || str_contains(urldecode(url()->current()),'-مدن-طلبات')) @lang('site.city-district'){{ ' ' . $areas[0]['governorate'] }} @elseif(str_contains(url()->current(),'-districts-requests') || str_contains(urldecode(url()->current()),'-احياء-طلبات')) @lang('site.district-compound'){{ ' ' . ($dists[0]['city'] ?? '') }} @elseif(str_contains(url()->current(),'-compounds-requests') || str_contains(urldecode(url()->current()),'-كمبوندات-طلبات')) @lang('site.coms'){{ ' ' . ($comps[0]['district'] ?? '') }} @endif @endsection @endif @section('content') @if (isset($areas))
@if(app()->getLocale() == 'ar') {{ Breadcrumbs::render($areas[0]['governorate'].'طلبات-مدن-') }} @else {{ Breadcrumbs::render($areas[0]['governorate'].'-cities-requests') }} @endif
@elseif(isset($dists))
@if(!empty($dists) && isset($dists[0]['city'])) @php $breadcrumbName = app()->getLocale() == 'ar' ? $dists[0]['city'].'طلبات-أحياء-' : $dists[0]['city'].'-districts-requests'; @endphp {{ Breadcrumbs::exists($breadcrumbName) ? Breadcrumbs::render($breadcrumbName) : Breadcrumbs::render( app()->getLocale() == 'ar' ? 'طلبات المحافظات' : 'Governorates Requests' ) }} @else {{ Breadcrumbs::render( app()->getLocale() == 'ar' ? 'طلبات المحافظات' : 'Governorates Requests' ) }} @endif
@elseif(isset($comps))
@if(!empty($comps) && isset($comps[0]['district'])) @php $breadcrumbName = app()->getLocale() == 'ar' ? $comps[0]['district'].'طلبات-كمبوندات-' : $comps[0]['district'].'-compounds-requests'; @endphp {{ Breadcrumbs::exists($breadcrumbName) ? Breadcrumbs::render($breadcrumbName) : Breadcrumbs::render( app()->getLocale() == 'ar' ? 'طلبات المحافظات' : 'Governorates Requests' ) }} @else {{ Breadcrumbs::render( app()->getLocale() == 'ar' ? 'طلبات المحافظات' : 'Governorates Requests' ) }} @endif
@else @if(app()->getLocale() == 'ar')
{{ Breadcrumbs::render('طلبات المحافظات') }}
@else
{{ Breadcrumbs::render('Governorates Requests') }}
@endif @endif {!! $breadcrumbSchema !!} {!! $blogPostSchema !!}
@lang('site.Filter Results')

@if (Route::is('site.gov-cities-requests') || Route::is('site.ar-gov-cities-requests')) @lang('site.gov-city-requests') @elseif(str_contains(url()->current(),'-cities-requests') || str_contains(urldecode(url()->current()),'-مدن-طلبات')) @lang('site.city-district'){{ ' ' . $areas[0]['governorate'] }} @elseif(str_contains(url()->current(),'-districts-requests') || str_contains(urldecode(url()->current()),'-احياء-طلبات')) @lang('site.district-compound'){{ ' ' . ($dists[0]['city'] ?? '') }} @elseif(str_contains(url()->current(),'-compounds-requests') || 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'] }}

@endforeach @endif
@endsection @section('script') @endsection