@php $details = $listing['details'] ?? []; $gallery = array_values($listing['gallery'] ?? []); $heroImage = $gallery[0] ?? 'https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1600'; $purpose = $details['listing_purpose'] ?? null; $isRent = $purpose === 'rent'; $purposeBadgeLabel = $isRent ? 'For Rent' : ($purpose === 'sell' ? 'For Sale' : null); $priceDisplay = is_numeric($listing['price'] ?? null) ? '₹'.number_format((float) $listing['price']) : ($listing['price'] ?? 'On Request'); $priceHeading = $isRent ? 'Rent / month' : 'Price'; $thumbShow = 6; $extraGallery = count($gallery) > $thumbShow ? array_slice($gallery, $thumbShow) : []; $visibleThumbs = array_slice($gallery, 0, $thumbShow); @endphp
@if(session('success')) @endif @if(session('error')) @endif @if($errors->any()) @endif
{{-- Main column --}}
{{-- Gallery --}}
{{ $listing['title'] }}
@if($purposeBadgeLabel) {{ $purposeBadgeLabel }} @endif

{{ $priceHeading }}

{{ $priceDisplay }}

@if(count($gallery) > 1)
@foreach($visibleThumbs as $idx => $img) @endforeach @if(count($extraGallery) > 0) @endif
@endif
{{-- Title & meta --}}

{{ $listing['title'] }}

{{ $listing['location'] }} @if(! empty($listing['posted_on'])) Listed {{ $listing['posted_on'] }} @endif

@if(! empty($details['bhk'])) {{ $details['bhk'] }} @endif @if(! empty($details['area_sqft'])) {{ $details['area_sqft'] }} sqft @endif @if(! empty($details['furnishing'])) {{ ucwords(str_replace('_', ' ', (string) $details['furnishing'])) }} @endif @if(! empty($details['property_type'])) {{ ucwords(str_replace('_', ' ', (string) $details['property_type'])) }} @endif
{{-- Description --}}

About this property

{{ $listing['description'] ?: 'Details will be shared when you express interest.' }}

{{-- Full specs --}}

{{ $detailsTitle }}

@foreach($totalFiles as $label => $value)
{{ $label }}
{{ $value ?: '—' }}
@endforeach
@if(! empty($listing['full_address']))

Full address

{{ $listing['full_address'] }}

@endif
{{-- Sidebar --}}
{{-- Related --}} @if(! empty($relatedListings))

More properties you may like

Similar listings in our catalogue

@foreach(array_slice($relatedListings, 0, 6) as $nearby) @php $nearbyPrice = is_numeric($nearby['price'] ?? null) ? '₹'.number_format((float) $nearby['price']) : ($nearby['price'] ?? 'On Request'); @endphp @endforeach
@endif
{{-- Full gallery modal --}} @if(count($gallery) > $thumbShow) @endif