@extends('site.layouts.master') @php $lastSegment = request()->segment(count(request()->segments())); if (request()->property_type_id) { if (LaravelLocalization::getCurrentLocale() == 'ar') { $Ttype = App\PropertyType::where('id', request()->property_type_id)->first()->label_ar; } else { $Ttype = App\PropertyType::where('id', request()->property_type_id)->first()->label; } } else { if (LaravelLocalization::getCurrentLocale() == 'ar') { $Ttype = 'عقارات'; $Ttypea = 'وحدات'; } else { $Ttype = 'Properties'; $Ttypea = 'Units'; } } if (request()->sub_type_id) { if (LaravelLocalization::getCurrentLocale() == 'ar') { $Tsubtype = App\SubType::where('id', request()->sub_type_id)->first()->sub_type_name_ar; } else { $Tsubtype = App\SubType::where('id', request()->sub_type_id)->first()->sub_type_name; } } else { LaravelLocalization::getCurrentLocale() == 'ar' ? ($Tsubtype = 'العقارات') : ($Tsubtype = 'properties'); } $Tcompound = null; $Tlocation = null; $address = strip_tags(request()->address); if (empty($address) && $lastSegment == 'custom-search') { $compoundId = is_array(request()->compound) ? (request()->compound[0] ?? null) : request()->compound; $districtId = is_array(request()->district) ? (request()->district[0] ?? null) : request()->district; $cityId = is_array(request()->city) ? (request()->city[0] ?? null) : request()->city; $governorateId = is_array(request()->governorate) ? (request()->governorate[0] ?? null) : request()->governorate; if (!empty($compoundId)) { $Tlocation = App\Compound::find($compoundId)?->name; } elseif (!empty($districtId)) { $Tlocation = App\District::find($districtId)?->name; } elseif (!empty($cityId)) { $Tlocation = App\City::find($cityId)?->name; } elseif (!empty($governorateId)) { $Tlocation = App\Governorate::find($governorateId)?->name; } } if (!empty($address)) { if (strpos($address, ',') > 0) { $data = explode(',', $address); $count = count($data); if ($count > 3) { $Tcompound = $data[0]; $Tdistrict = $data[1]; $Tcity = $data[2]; $Tgovernorate = $data[3]; } elseif ($count > 2) { $Tdistrict = $data[0]; $Tcity = $data[1]; $Tgovernorate = $data[2]; } elseif ($count > 1) { $Tcity = $data[0]; $Tgovernorate = $data[1]; } else { $Tgovernorate = $data[0]; } if (isset($Tdistrict)) { //$Tlocation = $Tdistrict; $Tlocation = App\District::where('district_name_en', $Tdistrict) ->orWhere('district_name_ar', $Tdistrict) ->first()?->name; } elseif (isset($Tcity)) { //$Tlocation = $Tcity; $Tlocation = App\City::where('city_name_en', $Tcity)->orWhere('city_name_ar', $Tcity)->first()?->name; } elseif (isset($Tgovernorate)) { //$Tlocation = $Tgovernorate; $Tlocation = App\Governorate::where('governorate_name_en', $Tgovernorate) ->orWhere('governorate_name_ar', $Tgovernorate) ->first()?->name; } } elseif (str_contains(url()->full(), 'district')) { $Tlocation = App\District::where('district_name_en', 'like', '%' . $address . '%') ->orWhere('district_name_ar', 'like', '%' . $address . '%') ->first()?->name; } elseif (str_contains(url()->full(), 'city')) { $Tlocation = App\City::where('city_name_en', 'like', '%' . $address . '%') ->orWhere('city_name_ar', 'like', '%' . $address . '%') ->first()?->name; } elseif (str_contains(url()->full(), 'governorate')) { $Tlocation = App\Governorate::where('governorate_name_en', 'like', '%' . $address . '%') ->orWhere('governorate_name_ar', 'like', '%' . $address . '%') ->first()?->name; } else { //$Tlocation = $address; $Tlocation = App\Compound::where('compound_name_en', 'like', '%' . $address . '%') ->orWhere('compound_name_ar', 'like', '%' . $address . '%') ->first()?->name; } } if (empty($Tlocation) && isset(request()->query()['location'])) { if (str_contains(request()->query()['location'], ',')) { $locArr = explode(',', request()->query()['location']); if ($locArr[0] == 'governorate') { $Tlocation = App\Governorate::find($locArr[1])?->name; } if ($locArr[0] == 'city') { $Tlocation = App\City::find($locArr[1])?->name; } if ($locArr[0] == 'district') { $Tlocation = App\District::find($locArr[1])?->name; } if ($locArr[0] == 'compound') { $Tlocation = App\Compound::find($locArr[1])?->name; } } } 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 (request()->property_for) { if (LaravelLocalization::getCurrentLocale() == 'ar') { if (request()->property_for == 'Sale') { $Tfor = 'للبيع'; } elseif (request()->property_for == 'Rent') { $Tfor = 'للايجار'; } else { $Tfor = 'للبيع او الايجار'; } } else { $Tfor = 'For ' . request()->property_for; } } else { if (LaravelLocalization::getCurrentLocale() == 'ar') { if (isset($for)) { if ($for == 'Sale') { $Tfor = 'للبيع'; } elseif ($for == 'Rent') { $Tfor = 'للايجار'; } else { $Tfor = 'للبيع او الايجار'; } } else { $Tfor = 'للبيع'; } } else { if (isset($for)) { $Tfor = 'For ' . $for; } else { $Tfor = 'For Sale'; } } } 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 = str_replace('-', ' ', request()->segments()[2]); }else{ $com_name = str_replace('-', ' ', request()->segments()[1]); } $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($ty))$ty = DB::table('property_types')->where('label', $com_name)->orWhere('label_ar', $com_name)->first(); if (!empty($com)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $com->city->city_name_en.'/'.$com->compound_name_en); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $com->city->city_name_ar.'/'.$com->compound_name_ar); } } if (!empty($dis)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $dis->city->city_name_en.'/'.$dis->district_name_en); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $dis->city->city_name_ar.'/'.$dis->district_name_ar); } } if (!empty($cit)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_en.'/'.$cit->city_name_en); } 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); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', 'govs/'.$gov->governorate_name_ar); } } if (!empty($ty)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $ty->label); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $ty->label_ar); } } @endphp @section('metatags') @if(!empty($seoRow)) @php $segment = request()->segments()[2] ?? null; $defaultTitle = 'RE/MAX ALMOHAGER ريـ/ـماكس المهاجر'; @endphp @if(!$segment || !Route::is('site.' . $segment)) @section('seoTags') @seoTags() @endsection @else
@lang('site.most_important_compounds_in_the_area')
@lang('site.Results')
@if ($lastSegment == 'custom-search') @endif@lang('site.Hot Spots')
@endif@lang('site.Related_Properties')
@foreach ($similar_properties ?? [] as $similar_property) @php $Tfor == 'FOR RENT' || $Tfor == 'للايجار' ? ($price = $similar_property->options->per_month) : ($price = $similar_property->options->sale_price); $Tfor == 'FOR RENT' || $Tfor == 'للايجار' ? ($currency = $similar_property->options->rent_currency) : ($currency = $similar_property->options->sale_currency); $mon = ''; if ($Tfor == 'FOR RENT') { $mon = '/month'; } if ($Tfor == 'للايجار') { $mon = '/شهر'; } if ($property->property_for == 'Rent') { $property_for = 'Rent'; } else { $property_for = 'Sale'; } @endphp{{ $project->compound->name }} @lang('site.In') {{ $project->compound->city->name }} @lang('site.By') {{ $project->compound->developer?->name }}
@lang('site.Starting Price')
{{ $project->starting_price_primery }} @lang('site.EGP')
@lang('site.Down Payment'):
{{ $project->down_payment ?? '1' }} @lang('site.EGP')
@lang('site.Contact_Us')
@lang('site.Popular Searches')
{{ $project->compound->name }} @lang('site.In') {{ $project->compound->city->name }} @lang('site.By') {{ $project->compound->developer?->name }}
@lang('site.Starting Price')
{{ $project->starting_price_primery }} @lang('site.EGP')
@lang('site.Down Payment'):
{{ $project->down_payment ?? '1' }} @lang('site.EGP')
@lang('site.Contact_Us')
@lang('site.Hot Spots')
@if (count(App\HotspotArea::getAll()))@lang('site.Popular Searches')
{{$title}}
{!! $content !!}@lang('site.most_important_compounds_in_the_area')
@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Governorates')
@foreach ($gov_IDS as $link)@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Cities')
@foreach ($city_IDS as $link)@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Districts')
@foreach ($district_IDS as $link)@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Compounds')
@foreach ($compound_IDS as $link)@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Governorates')
@foreach ($gov_IDS as $link) @if(!empty($link->governorate->name))@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Cities')
@foreach ($city_IDS as $link) @if(!empty($link->city->name))@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Districts')
@foreach ($district_IDS as $link) @if(!empty($link->district->name))@lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif @lang('site.By Compounds')
@foreach ($compound_IDS as $link) @if(!empty($link->compound->name))@lang('site.Search For Cheap') @lang('site.Property') @if(Lang::has('site.For_'.$for)) @lang('site.For_'. $for) @else @lang('site.'.$for) @endif
@foreach ($cheap_IDS as $link) @if(!empty($link->district->name))