@extends('frontend/layouts_frontend/master_frontend') @section('title') Apartment Details - Relocate Uganda @endsection @section('extra_styles') @endsection {{-- CONTENT SECTION --}} @section('content') Apartments Details We have the properties you have been looking for ! @if (session('messagesave')) {{-- {{ session('message')}} --}} {{ session('messagesave') }} @endif @if (session('messagenoapartments')) {{-- {{ session('message')}} --}} {{ session('messagenoapartments') }} @endif @if ($apartment->units_available > 0) PROPERTY AVAILABLE FOR BOOKING @elseif($apartment->units_available <= 0) APARTMENT UNITS ALL ALREADY BOOKED You cannot book it. @else N/A @endif @if (!empty($apartment->price)) PRICE : USD {{ $apartment->price }} @else PRICE : N/A @endif | @if (!empty($apartment->units_available >= 0)) UNITS LEFT : {{ $apartment->units_available }} @elseif($apartment->units_available == 0) 0 @else N/A @endif @if (!empty($apartment->name)) {{ $apartment->name }} @else N/A @endif @if (!empty($apartment->address)) Address : {{ $apartment->address }} @else Address : N/A @endif @if (!empty($apartment->city)) City : {{ $apartment->city }} @else City : N/A @endif @if (!empty($apartment->created_at)) Added on : {{ $apartment->created_at }} @else Added on : N/A @endif @if (!empty($apartment->apartment_category->category_name)) Category : {{ $apartment->apartment_category->category_name }} @else Category : N/A @endif {{-- left side bar --}} {{-- featured photo --}} {{-- end featured photo --}} About This Apartment @if (!empty($apartment->description)) {{ $apartment->description }} @else N/A @endif {{-- photo library upload --}} Apartment Photos Collection {{-- pick multiple images from array --}} @if (!empty($apartment->photo_library)) @foreach (is_null($apartment->photo_library) ? [] : explode(',', $apartment->photo_library) as $image) {{-- START COL --}} {{-- END COL --}} @endforeach @else No Photos Available @endif {{-- end pick multiple images from array --}} {{-- end of photo library upload --}} {{-- overview --}} Overview of the apartment Unique ID @if (!empty($apartment->unique_id)) {{ $apartment->unique_id }} @else N/A @endif Category : @if (!empty($apartment->apartment_category->category_name)) {{ $apartment->apartment_category->category_name }} @else N/A @endif Beds : @if (!empty($apartment->beds)) {{ $apartment->beds }} @else N/A @endif Size : @if (!empty($apartment->size)) {{ $apartment->size }} Sqft @else N/A @endif Rooms : @if (!empty($apartment->rooms)) {{ $apartment->rooms }} @else N/A @endif Bathrooms : @if (!empty($apartment->bathrooms)) {{ $apartment->bathrooms }} @else N/A @endif Balcony : @if (!empty($apartment->balcony)) @if ($apartment->balcony == '1') Yes @endif @if ($apartment->balcony == '0') No @endif @else N/A @endif Booking : @if (!empty($apartment->property_booked_status)) @if ($apartment->property_booked_status == '1') Available @endif @if ($apartment->property_booked_status == '0') Booked @endif @else N/A @endif {{-- amenities --}} Amenities @forelse ($apartment->amenities as $amenity) {{ $amenity->name }} @empty No Amenities Available @endforelse {{-- end of amenities --}} {{-- FETCH PROXIMITY INFORMATION --}} Proximities to nearby areas @php // pick proximities in each category $apartment_proximities_data = !empty($apartment->apartment_proximities) ? json_decode($apartment->apartment_proximities, true): []; // pick data $restaurants_nearyby = collect($apartment_proximities_data)->where('place_category','restaurant'); $shopping_malls_nearby = collect($apartment_proximities_data)->where('place_category','shopping_mall'); $police_station_nearby = collect($apartment_proximities_data)->where('place_category','police_station'); $schools_nearby = collect($apartment_proximities_data)->where('place_category','school'); $hospitals_nearby = collect($apartment_proximities_data)->where('place_category','hospital'); $sports_grounds_nearby = collect($apartment_proximities_data)->where('place_category','sports_ground'); $christian_worship_places_nearby = collect($apartment_proximities_data)->where('place_category','christian_worship_place'); $moslem_worship_places_nearby = collect($apartment_proximities_data)->where('place_category','moslem_worship_place'); @endphp {{-- fetch nearby restaurants --}} @if (count($restaurants_nearyby) > 0) Restaurants Nearby @foreach ($restaurants_nearyby as $key => $restaurant) Name : {{ $restaurant['place_name'] }} | Distance : | {{ $restaurant['place_distance'] }} Time : {{ $restaurant['place_time'] }} | Address : {{ $restaurant['place_address'] }} @endforeach @else No Restaurants Nearby @endif {{-- end of fetch nearby restaurants --}} {{-- fetch nearby shopping malls --}} @if (count($shopping_malls_nearby) > 0) Shopping Malls Nearby @foreach ($shopping_malls_nearby as $key => $shopping_mall) {{-- {{ dd($shopping_mall) }} --}} Name : {{ $shopping_mall['place_name'] }} | Distance : | {{ $shopping_mall['place_distance'] }} Time : {{ $shopping_mall['place_time'] }} | Address : {{ $shopping_mall['place_address'] }} @endforeach @else No Shopping Malls Nearby @endif {{-- end of fetch nearby shopping malls --}} {{-- fetch police stations --}} @if (count($police_station_nearby) > 0) Police Stations Nearby @foreach ($police_station_nearby as $key => $police_station) Name : {{ $police_station['place_name'] }} | Distance : | {{ $police_station['place_distance'] }} Time : {{ $police_station['place_time'] }} | Address : {{ $police_station['place_address'] }} @endforeach @else No Police Stations Nearby @endif {{-- end of fetch police stations --}} {{-- fetch schools nearby --}} @if (count($schools_nearby) > 0) Schools Nearby @foreach ($schools_nearby as $key => $schools) Name : {{ $schools['place_name'] }} | Distance : | {{ $schools['place_distance'] }} Time : {{ $schools['place_time'] }} | Address : {{ $schools['place_address'] }} @endforeach @else No Schools Nearby @endif {{-- end of fetch schools nearby --}} {{-- fetch Hospitals Nearby --}} @if (count($hospitals_nearby) > 0) Hospitals Nearby @foreach ($hospitals_nearby as $key => $hospital) Name : {{ $hospital['place_name'] }} | Distance : | {{ $hospital['place_distance'] }} Time : {{ $hospital['place_time'] }} | Address : {{ $hospital['place_address'] }} @endforeach @else No Hospitals Nearby @endif {{-- end of fetch schools nearby --}} {{-- fetch Sports grounds Nearby --}} @if (count($sports_grounds_nearby) > 0) Sports Grounds Nearby @foreach ($sports_grounds_nearby as $key => $sports_ground) Name : {{ $sports_ground['place_name'] }} | Distance : | {{ $sports_ground['place_distance'] }} Time : {{ $sports_ground['place_time'] }} | Address : {{ $sports_ground['place_address'] }} @endforeach @else No Sports grounds Nearby @endif {{-- end of fetch sports ground nearby --}} {{-- fetch Christian Worship Places Nearby --}} @if (auth()->user()->religion === 'christian') @if (count($christian_worship_places_nearby) > 0) Christian Worship Places Nearby @foreach ($christian_worship_places_nearby as $key => $christian_worship_place) Name : {{ $christian_worship_place['place_name'] }} | Distance : | {{ $christian_worship_place['place_distance'] }} Time : {{ $christian_worship_place['place_time'] }} | Address : {{ $christian_worship_place['place_address'] }} @endforeach @else No Christian Worship Places Nearby @endif {{-- end of fetch christian worship places nearby --}} @endif {{-- fetch Moslem worship Places Nearby --}} @if (auth()->user()->religion === 'moslem') @if (count($moslem_worship_places_nearby) > 0) Moslem Worship Places Nearby @foreach ($moslem_worship_places_nearby as $key => $moslem_worship_place) Name : {{ $moslem_worship_place['place_name'] }} | Distance : | {{ $moslem_worship_place['place_distance'] }} Time : {{ $moslem_worship_place['place_time'] }} | Address : {{ $moslem_worship_place['place_address'] }} @endforeach @else No Moslem worship Places Nearby @endif @endif {{-- end of fetch moslem worship places nearby --}} {{-- END OF FETCH PROXIMITY INFORMATION --}} {{-- end left side bar --}} {{-- side bar right --}} {{-- BOOKING FORM --}} Book this apartment @csrf @error('first_name') {{ $message }} @enderror @error('last_name') {{ $message }} @enderror @error('email') {{ $message }} @enderror @error('nationality') {{ $message }} @enderror {{-- submit --}} @if ($apartment->units_available > 0) BOOK NOW @else ALL APARTMENT UNITS BOOKED You cannot book it. @endif {{-- END BOOKING FORM --}} {{-- video url --}} @if (!empty($apartment->property_video_url)) Video tour {{-- Property Preview --}} @else No Property Video Added @endif {{-- end of video --}} {{-- google map --}} @if (!empty($apartment->google_map_iframe_url)) Google map @else No Property Map Added @endif {{-- end of google map --}} {{-- end side bar right --}} @endsection
We have the properties you have been looking for !
@if (!empty($apartment->description)) {{ $apartment->description }} @else N/A @endif