@extends('../layout/home-layout') @section('title','Room Allocation Forecast') @section('home-content')
Room | @forelse ($table as $row){{$row['date']}} | @empty @endforelse|||
{{$room->room_name}} | @forelse ($table as $mahaloop) @foreach ($table as $podiloop) @if($mahaloop['date'] == $podiloop['date']) @if ($podiloop['rooms']==null)Vacant | @else @php $checked = 0; $status = null; $type = null; $ref_id = null; foreach ($podiloop['rooms'] as $roomloop) { if($roomloop['room_id'] == $room->room_id){ $checked = 1; $status = $roomloop['status']; $type = $roomloop['type']; $ref_id = $roomloop['ref_id']; break; }else{ } } @endphp @if($checked==1) @switch($type) @case(1) {{-- if this is this is a reservation show this button --}}{{$status}} | @break @case(2) {{-- if this is this is a booking show this button --}}{{$status}} | @break @default @endswitch @elseVacant | @endif @endif @endif @endforeach @empty @endforelse