@php
$city = null;
$State = null;
$country = null;
if ($room->city_id) {
$city = App\Models\Location\City::Where('id', $room->city_id)->first()->name;
}
if ($room->state_id) {
$State = App\Models\Location\State::Where('id', $room->state_id)->first()->name;
}
if ($room->country_id) {
$country = App\Models\Location\Country::Where('id', $room->country_id)->first()->name;
}
@endphp
{{ @$city }}@if (@$State)
, {{ $State }}
@endif @if (@$country)
, {{ $country }}
@endif
{{ number_format($room->average_rating, 2) }}
({{ totalRoomReview($room->id) }}
{{ totalRoomReview($room->id) > 1 ? __('Reviews') : __('Review') }})
@php
$amenities = json_decode($room->amenities);
$totalAmenities = count($amenities);
$displayCount = 5;
@endphp
@foreach ($amenities as $index => $amenitie)
@php
if ($index >= $displayCount) {
break;
}
$amin = App\Models\Amenitie::find($amenitie);
@endphp
@endforeach
@if ($totalAmenities > $displayCount)
-
(+{{ $totalAmenities - $displayCount }})
@foreach ($amenities as $index => $amenitie)
@php
if ($index < $displayCount) {
continue;
}
$amin = App\Models\Amenitie::find($amenitie);
@endphp
@endforeach
@endif