@php $isFavorite = in_array((int) $property->id, $favoriteIds, true); $isManaged = in_array((int) $property->id, $managedPropertyIds, true); $imagePath = optional($property->images->first())->file_path; $features = array_slice(array_filter($property->features ?? []), 0, 3); $statusClass = in_array($property->status, ['available', 'active'], true) ? 'text-bg-success' : ($property->status === 'under_review' ? 'text-bg-danger' : 'text-bg-light'); @endphp
{{ $property->title }}
{{ $property->is_recommended ? 'Recommended' : 'Property' }}
@if ($property->is_recommended) Featured @endif @if ($isManaged) Selected @else {{ $property->status_label }} @endif
@if ($isFavorite)
@csrf @method('DELETE')
@else
@csrf
@endif
{{ $property->title }}
{{ collect([$property->location_city, $property->location_country])->filter()->implode(', ') ?: 'Location not listed' }}
{{ $property->formatted_price }}
{{ $property->roi !== null ? rtrim(rtrim(number_format((float) $property->roi, 2), '0'), '.') . '% ROI' : 'ROI not listed' }}
{{ optional($property->propertyType)->name ?? optional($property->assetClass)->name ?? 'Property' }}
{{ $property->bedrooms ?? '—' }} bed
{{ $property->bathrooms ?? '—' }} bath
{{ $property->area_sqm !== null ? number_format((float) $property->area_sqm) : '—' }} m²

{{ \Illuminate\Support\Str::limit($property->description ?: 'No property description available.', 150) }}

@if ($features) @foreach ($features as $feature) {{ $feature }} @endforeach @if (count($property->features ?? []) > count($features)) +{{ count($property->features) - count($features) }} more @endif @else Features not listed @endif
@if ($isManaged)
@csrf @method('DELETE')
@elseif (in_array($property->status, ['available', 'active'], true))
@csrf
@else @endif