@extends('layouts.public') @section('title', $listing->seoTitle()) @section('meta_description', $listing->seoDescription()) @section('meta_image', $listing->cover_image ? asset_path($listing->cover_image) : '') @push('head') @endpush @push('structured-data') {{-- Schema.org, so a search engine can read the price, the place and the photographs without inferring them from the markup (specification ยง23). Built in PHP rather than inline in @json(): Blade treats the leading @ of "@context" and "@type" as its own directive syntax and mangles the array. --}} @php $schema = [ '@context' => 'https://schema.org', '@type' => 'RealEstateListing', 'name' => $listing->title, 'url' => $canonical, 'description' => $listing->seoDescription(), 'datePosted' => $listing->published_at?->toIso8601String(), 'image' => $images->take(6)->map(fn ($m) => $m->url())->filter()->values()->all(), 'offers' => array_filter([ '@type' => 'Offer', 'price' => $listing->price_on_request || ! $listing->price ? null : $listing->price / 100, 'priceCurrency' => $listing->currency, 'availability' => $listing->isLive() ? 'https://schema.org/InStock' : 'https://schema.org/SoldOut', ]), 'address' => array_filter([ '@type' => 'PostalAddress', 'streetAddress' => $listing->address, 'addressLocality' => $listing->municipality, 'addressRegion' => $listing->province ?: $listing->district, 'addressCountry' => $listing->country, ]), ]; @endphp @endpush @section('content') @php($period = $listing->pricePeriodLabel())
@php($cover = $images->firstWhere('is_cover') ?? $images->first()) @php($gallery = $images->map(fn ($m) => ['src' => $m->url(), 'caption' => $m->caption])->values())
@if ($cover) {{-- The LCP image: eager, high priority, never lazy. --}} srcset()) srcset="{{ $srcset }}" sizes="(min-width: 1024px) 60vw, 100vw" @endif alt="{{ $cover->alt_text ?: $listing->title }}" fetchpriority="high" decoding="async" class="aspect-4/3 w-full object-cover sm:aspect-16/10"> @else @endif {{ $listing->intent->label() }} @if ($listing->status->isClosed()) {{ $listing->status->label() }} @endif @if ($gallery->isNotEmpty()) @endif
@if ($images->count() > 1)
@foreach ($images as $index => $medium) @endforeach
@endif @include('public.partials.lightbox')
{{-- Facts rail. Spans both rows so it stays with the reader. --}}
@if ($listing->amenities->isNotEmpty())

{{ __('Amenities') }}

    @foreach ($listing->amenities as $amenity)
  • {{ $amenity->name }}
  • @endforeach
@endif @if ($specification)

{{ __('Specification') }}

@foreach ($specification as $row)
{{ $row['label'] }}
{{ $row['value'] }}
@endforeach
@endif @if ($floorPlans->isNotEmpty())

{{ __('Floor plans') }}

@foreach ($floorPlans as $plan)
{{ $plan->caption ?: __('Floor plan') }} @if ($plan->caption)
{{ $plan->caption }}
@endif
@endforeach
@endif @if ($videos->isNotEmpty())

{{ __('Tour') }}

@endif @if ($listing->latitude && $listing->longitude)

{{ __('Location') }}

{{-- Whose tiles these are is the provider's business; see App\Contracts\MapProvider. --}}
@endif
@if ($similar->isNotEmpty())
{{ __('All properties in :place', ['place' => $listing->district ?: __('this area')]) }}
@include('public.partials.listing-grid', ['listings' => $similar])
@endif @endsection