@if ($data->rooms && count($data->rooms))
@php
$bedRents = [];
$roomRents = [];
foreach ($data->rooms as $room) {
$type = strtolower(trim($room->type));
if ($type === 'private room') {
$roomRents[] = $room->rent;
} else {
$bedRents[] = $room->rent;
}
}
$minBed = count($bedRents) ? min($bedRents) : null;
$maxBed = count($bedRents) ? max($bedRents) : null;
$minRoom = count($roomRents) ? min($roomRents) : null;
$maxRoom = count($roomRents) ? max($roomRents) : null;
@endphp
@if ($minBed)
₹{{ number_format($minBed) }}
@if ($minBed != $maxBed)
– ₹{{
($maxBed) }}
@endif
/bed
@endif
@if ($minBed && $minRoom)
—
@endif
@if ($minRoom)
₹{{ number_format($minRoom) }}
@if ($minRoom != $maxRoom)
– ₹{{ number_format($maxRoom) }}
@endif
/room
@endif
@endif
{{ $data->name ?? '' }}
{{ ucwords($data->locality) ?? '' }},
{{ ucwords($data->location->name) ?? '' }}
{{ ucwords($data->user->name) ?? '' }}
{{ strtolower($data->user->user_type) == 'builder/developer' ? 'Developer' : ucwords($data->user->user_type) }}
@if ($data->rooms && $data->rooms->count())
@php
$roomCount = $data->rooms->count();
$colClass = match ($roomCount) {
1 => 'col-12', // Full width
2 => 'col-6', // Two equal columns
3 => 'col-4', // Three equal columns
4 => 'col-3',
default => 'col-12 col-sm-6 col-md-4', // Responsive fallback
};
@endphp
@if ($data->pg_for)
@php
$pgForList = explode(',', $data->pg_for);
$pgForFormatted = collect($pgForList)
->map(fn($item) => ucwords(trim($item)))
->implode(', ');
@endphp
Gender
{{ $pgForFormatted }}
@endif
@if ($data->meals_available)
Available Food
{{ ucwords($data->meals_available) }}
@endif