@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')
{{ $gov['cities'] . ' ' . __('site.Cities') }}
@endif @if ($gov['requests'] > 0){{ $gov['requests'] . ' ' . __('site.Requests') }}
@endif{{ $area['districts'] . ' ' . __('site.district') }}
@endif @if ($area['compounds'] > 0){{ $area['compounds'] . ' ' . __('site.compound') }}
@endif @if ($area['requests'] > 0){{ $area['requests'] . ' ' . __('site.Requests') }}
@endif{{ $dist['compounds'] . ' ' . __('site.compound') }}
@endif @if ($dist['requests'] > 0){{ $dist['requests'] . ' ' . __('site.Requests') }}
@endif{{ $comp['requests'] . ' ' . __('site.Requests') }}
@endif