@extends('site.layouts.master',['hide_footer' => true]) {{--@section('title')--}} {{--{{__('site.REQUESTS')}}--}} {{--@endsection--}} @section('seoTags') @seoTags() @endsection @php $lastSegment = request()->segment(count(request()->segments())); $seo = SEO\Models\Page::where('path',URL::full())->first(); @endphp @section('title') @if(isset($typeHeader)) {{ $typeHeader }} @elseif(isset($governorateHeader) || isset($cityHeader) || isset($districtHeader) || isset($compoundHeader)) {{ __('site.Properties_requests') .' '. __('site.In') .' '.str_replace('-',' ',$lastSegment) }} @else @if(request()->property_type_id) @if(app()->getLocale() == 'ar') @lang('site.requests') @endif {{ App\PropertyType::find(request()->property_type_id)->label }} @if(app()->getLocale() == 'en') @lang('site.requests') @endif @else @lang('site.Properties_requests') @endif @endif @endsection @section('metatags') @if(!empty($seo)) @endif @php if(count(request()->segments()) == 3){ $com_name = str_replace('request-', ' ', request()->segments()[2]); $com_name = str_replace('requests-', ' ', request()->segments()[2]); }else{ $com_name = str_replace('request-', ' ', request()->segments()[1]); $com_name = str_replace('requests-', ' ', request()->segments()[1]); } $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($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.'/request-'.$com->compound_name_en); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $com->city->city_name_ar.'/request-'.$com->compound_name_ar); } } if (!empty($dis)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $dis->city->city_name_en.'/request-'.$dis->district_name_en); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $dis->city->city_name_ar.'/request-'.$dis->district_name_ar); } } if (!empty($cit)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_en.'/request-'.$cit->city_name_en); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', $cit->governorate->governorate_name_ar.'/request-'.$cit->city_name_ar); } } if (!empty($gov)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', 'govs/request-'.$gov->governorate_name_en); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', 'govs/request-'.$gov->governorate_name_ar); } } if (!empty($ty)) { if (request()->segments()[0] == 'ar') { $opposite_slug = str_replace(' ', '-', 'requests-'.$ty->label); } if (request()->segments()[0] == 'en') { $opposite_slug = str_replace(' ', '-', 'requests-'.$ty->label_ar); } } @endphp @if(!empty($opposite_slug)) @else @endif @endsection @section('content') @if(Route::is('site.requests.Buy'))
{{ Breadcrumbs::render('Buy') }}
@elseif(Route::is('site.requests.Rent-requests'))
{{ Breadcrumbs::render('Rent Requests') }}
@elseif(isset($governorateHeader))
@if($requests->first()) @if(app()->getLocale() == 'ar') {{ Breadcrumbs::render('طلبات-'.$requests->first()->locations->first()->governorate->name) }} @else {{ Breadcrumbs::render($requests->first()->locations->first()->governorate->name.'-requests') }} @endif @endif
@elseif(isset($cityHeader))
@if($requests->first()) @if(app()->getLocale() == 'ar') {{ Breadcrumbs::render('city-'.$requests->first()->locations->first()->city->id.'-طلبات-مدينة') }} @else {{ Breadcrumbs::render($requests->first()->locations->first()->city->name.'-city-requests') }} @endif @endif
@elseif(isset($districtHeader))
@if($requests->first()) @if(app()->getLocale() == 'ar') {{ Breadcrumbs::render( $requests->first()->locations()->whereNotNull('district_id')->first()->district->city->city_name_ar .'-مدينة-طلبات-حى-'. $requests->first()->locations()->whereNotNull('district_id')->first()->district->district_name_ar ) }} @else {{ Breadcrumbs::render($requests->first()->locations()->whereNotNull('district_id')->first()->district->city->name.'-city-'.$requests->first()->locations()->whereNotNull('district_id')->first()->district->name.'-district-requests') }} @endif @endif
@elseif(isset($compoundHeader)) {{-- {{ dd($requests->first()->locations->first()) }} --}}
@if($requests->first()) @if(app()->getLocale() == 'ar') {{ Breadcrumbs::render('طلبات-كمبوند-'.$requests->first()->locations->first()->compound->compound_name_ar) }} @else {{ Breadcrumbs::render($requests->first()->locations->first()->compound->name.'-compound-requests') }} @endif @endif
@elseif(isset($typeHeader))
@if($requests->first()) @if(app()->getLocale() == 'ar') {{ Breadcrumbs::render('طلبات-'.$requests->first()->demandPropertyTypes->first()->propertyTypes->label_ar) }} @else {{ Breadcrumbs::render($requests->first()->demandPropertyTypes->first()->propertyTypes->label.'-requests') }} @endif @endif
@endif @isset($breadcrumbSchema) {!! $breadcrumbSchema !!} @endisset
@if(empty($seo->title))

@if(isset($typeHeader)) {{ $typeHeader }} @elseif(isset($governorateHeader) || isset($cityHeader) || isset($districtHeader) || isset($compoundHeader)) {{ __('site.Properties_requests') .' '. __('site.In') .' '.str_replace('-',' ',$lastSegment) }} @else @if(request()->property_type_id) @if(app()->getLocale() == 'ar') @lang('site.requests') @endif {{ App\PropertyType::find(request()->property_type_id)->label }} @if(app()->getLocale() == 'en') @lang('site.requests') @endif @else @lang('site.Properties_requests') @endif @endif

@else

{{$seo->title}}

@endif @if(!empty($titleIntro))

{{ $titleIntro }}

@endif
@if ($lastSegment != 'search')

@lang('site.Save_Search')

@endif
@include('site.template.request-index', ['requests' => $requests])
@if ($requests->nextPageUrl()) @endif

@lang('site.similar_requests')

{{--

@lang('site.How Do Requests Works'):

video_placeholder
--}}

@lang('site.Owners / Brokers')

@lang('site.I have a property that fits your request')

{{--
--}}
@if ($seo != null) @php if (LaravelLocalization::getCurrentLocale() == 'ar') { $content = $seo->content_ar; } else { $content = $seo->content; } @endphp @if (isset($content)) {{-- --}} @endif @endif
@endsection @section('script') @include('site.layouts.js.favouriteButtonScript') @include('site.layouts.js.applySort') @endsection