@if($properties->isEmpty())
No properties linked to this broker yet.
@else
| Property |
Owner |
Purpose |
Status |
|
@foreach($properties as $property)
@php
$statusMap = [
'published' => ['bg-success-subtle text-success', 'Published'],
'under_review' => ['bg-warning-subtle text-warning', 'Under Review'],
'unavailable' => ['bg-secondary-subtle text-secondary', 'Unavailable'],
];
$statusStyle = $statusMap[$property->status] ?? ['bg-light text-muted', ucfirst($property->status)];
$purposeMap = \App\Models\Property::LISTING_PURPOSES;
@endphp
|
{{ $property->title }}
@if($property->city)
{{ $property->city }}
@endif
|
{{ optional($property->owner)->name ?? '—' }} |
{{ $purposeMap[$property->listing_purpose] ?? $property->listing_purpose }}
|
{{ $statusStyle[1] }}
|
|
@endforeach
@endif