@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())