@extends('layouts.frontend') @push('title', get_phrase('Real-Estate Directory Listing')) @push('meta')@endpush @push('css') @endpush @section('frontend_layout') @php $RealEstateDiscount = json_decode(get_homepage_settings('RealEstateDiscount') ?? '{}'); $title = $RealEstateDiscount->title ?? ''; $lastWordStart = strrpos($title, ' '); $firstPart = $lastWordStart !== false ? substr($title, 0, $lastWordStart) : ''; $lastPart = $lastWordStart !== false ? substr($title, $lastWordStart + 1) : $title; @endphp

{{ get_phrase('Discount') }}

{{ $firstPart }} {{ $lastPart }}

{{ $RealEstateDiscount->description }}

{{ get_phrase('New Properties') }}

{{ get_phrase('Explore All Properties') }}
@foreach ($top_listings->sortByDesc('created_at')->take(4) as $listing)
@php $images = json_decode($listing->image); $image = isset($images[0]) ? $images[0] : null; $claimStatus = App\Models\ClaimedListing::where('listing_id', $listing->id)->where('listing_type', 'real-estate')->first(); @endphp

{{ $listing->status }}

@php $is_in_wishlist = check_wishlist_status($listing->id, $listing->type); @endphp
@php $city_name = App\Models\City::where('id', $listing->city)->first()->name; $country_name = App\Models\Country::where('id', $listing->country)->first()->name; @endphp

{{ $city_name . ', ' . $country_name }}

{{ $listing->bed . ' ' . get_phrase('Bed') }}

{{ $listing->bath . ' ' . get_phrase('Bath') }}

{{ $listing->size . ' ' . get_phrase('sqft') }}

@if (!empty($listing->discount))

{{ currency($listing->discount) }}

{{ currency($listing->price) }}

@elseif(!empty($listing->price))

{{ currency($listing->price) }}

@endif
@endforeach
@foreach ($top_listings->where('status', 'sell')->take(4) as $listing)
@php $images = json_decode($listing->image); $image = isset($images[0]) ? $images[0] : null; $claimStatus = App\Models\ClaimedListing::where('listing_id', $listing->id)->where('listing_type', 'real-estate')->first(); @endphp

{{ $listing->status }}

@php $is_in_wishlist = check_wishlist_status($listing->id, $listing->type); @endphp
@php $city_name = App\Models\City::where('id', $listing->city)->first()->name; $country_name = App\Models\Country::where('id', $listing->country)->first()->name; @endphp

{{ $city_name . ', ' . $country_name }}

{{ $listing->bed . ' ' . get_phrase('Bed') }}

{{ $listing->bath . ' ' . get_phrase('Bath') }}

{{ $listing->size . ' ' . get_phrase('sqft') }}

@if (!empty($listing->discount))

{{ currency($listing->discount) }}

{{ currency($listing->price) }}

@elseif(!empty($listing->price))

{{ currency($listing->price) }}

@endif
@endforeach
@foreach ($top_listings->where('status', 'rent')->take(4) as $listing)
@php $images = json_decode($listing->image); $image = isset($images[0]) ? $images[0] : null; $claimStatus = App\Models\ClaimedListing::where('listing_id', $listing->id)->where('listing_type', 'real-estate')->first(); @endphp

{{ $listing->status }}

@php $is_in_wishlist = check_wishlist_status($listing->id, $listing->type); @endphp
@php $city_name = App\Models\City::where('id', $listing->city)->first()->name; $country_name = App\Models\Country::where('id', $listing->country)->first()->name; @endphp

{{ $city_name . ', ' . $country_name }}

{{ $listing->bed . ' ' . get_phrase('Bed') }}

{{ $listing->bath . ' ' . get_phrase('Bath') }}

{{ $listing->size . ' ' . get_phrase('sqft') }}

@if (!empty($listing->discount))

{{ currency($listing->discount) }}

{{ currency($listing->price) }}

@elseif(!empty($listing->price))

{{ currency($listing->price) }}

@endif
@endforeach
@endsection @push('js') @if (Auth::check()) @else @endif @endpush