Filter

@foreach($rooms as $roomType => $roomList)

{{ $roomType }} Inventory

@for($i = 0; $i < 17; $i++) @endfor @foreach($roomList as $room) @foreach($room->rates as $rate) @for($i = 0; $i < 17; $i++) @php $currentDate=$startDate-> copy()->addDays($i); $numRoomsBooked = 0; foreach ($room->bookings as $booking) { $checkIn = Carbon\Carbon::parse($booking->check_in)->startOfDay(); $checkOut = Carbon\Carbon::parse($booking->check_out)->endOfDay(); if ($currentDate->between($checkIn, $checkOut)) { $numRoomsBooked++; } } $numRoom = $room->no - $numRoomsBooked; @endphp @endfor @endforeach @endforeach
Room Type Rate {{ $startDate->copy()->addDays($i)->format('d M') }}
{{ $rate->name }} Rates {{ number_format($rate->rate) }}

@if($numRoom < 1) {{ $numRoom }} rooms @else {{ $numRoom }} rooms @endif
@endforeach