@php $purposeIsRent = $property->listing_purpose === 'for_rent'; $purposeLabel = $purposeIsRent ? 'For Rent' : 'For Sale'; $purposeBadgeClass = $purposeIsRent ? 'badge-rent' : 'badge-sale'; $typeLabel = $propertyTypes[$property->type] ?? ucfirst(str_replace('-', ' ', $property->type)); $detailUrl = $property->public_slug ? route('public.properties.show', ['slug' => $property->public_slug, 'id' => $property->id]) : '#'; // Never `location` (the free-text "Full Address" field) — exact // address must never reach a public page (PUB-12); it's excluded at // the query level too (see PublicPropertySearchService::PUBLIC_COLUMNS). $localityCity = (string) $property->city; $isNew = $property->created_at && $property->created_at->gt(now()->subDays(7)); $bhk = \App\Models\Property::bhkDisplayNumber($property->type_details['bhk'] ?? null); $areaLabel = rtrim(rtrim(number_format((float) $property->area, 2, '.', ''), '0'), '.') . ' ' . $property->area_unit; $specStrip = $bhk ? "{$bhk} BHK · {$areaLabel}" : ($property->type === 'plot' ? "{$areaLabel} plot" : $areaLabel); $chipTags = ($property->tags ?? collect())->take(3); @endphp
@if ($property->coverImage) {{ $property->title }} @else Property photo @endif
{{ $purposeLabel }} @if ($isNew) New @endif
@if (($property->images_count ?? 0) > 0) {{ $property->images_count }} {{ Str::plural('photo', $property->images_count) }} @endif
{{ $typeLabel }} Posted {{ $property->created_at->format('d M Y') }}

{{ $property->title }}

@if ($localityCity)
{{ $localityCity }}
@endif
{{ $property->formattedPrice() }}
{{ $specStrip }}
@if ($chipTags->isNotEmpty())
@foreach ($chipTags as $tag) {{ $tag->name }} @endforeach
@endif