{{--
    --}} {{-- @php--}} {{-- $i = 1;--}} {{-- $length = count($bus_seats);--}} {{-- @endphp--}} {{-- @foreach($bus_seats as $i => $busSeat)--}} {{-- @if($i === $length)--}} {{--
  1. --}} {{--
      --}} {{-- @foreach($busSeat as $seat)--}} {{--
    1. --}} {{-- @if($seat->seat_status == 1)--}} {{-- @if($booking_status == 1)--}} {{-- --}} {{-- --}} {{-- @elseif($booking_status > 1)--}} {{-- --}} {{-- --}} {{-- @else--}} {{-- --}} {{-- --}} {{-- @endif--}} {{-- @endif--}} {{--
    2. --}} {{-- @endforeach--}} {{--
    --}} {{--
  2. --}} {{-- @else--}} {{--
  3. --}} {{--
      --}} {{-- @foreach($busSeat as $seat)--}} {{--
    1. --}} {{-- @if($seat->seat_status == 1)--}} {{-- @if($booking_status == 1)--}} {{-- --}} {{-- --}} {{-- @elseif($booking_status > 1)--}} {{-- --}} {{-- --}} {{-- @endif--}} {{-- @endif--}} {{--
    2. --}} {{-- @endforeach--}} {{--
    --}} {{--
  4. --}} {{-- @endif--}} {{-- @endforeach--}} {{--
--}}
    @php $i = 1; $length = count($bus_seats); $booking_status = 0; @endphp @foreach($bus_seats as $i => $busSeat) @if($i === $length)
    1. @foreach($busSeat as $seat) @php $booking_status = \Illuminate\Support\Facades\DB::table('bookings') ->where('schedule_id', $schedule) ->where('seat_id', $seat->seat) ->value('status'); @endphp
    2. @if($seat->seat_status == 1) @if($booking_status == 1) @elseif($booking_status > 1) @else {{-- --}} @endif @endif
    3. @endforeach
  1. @else
    1. @foreach($busSeat as $seat) @php $booking_status = \Illuminate\Support\Facades\DB::table('bookings') ->where('schedule_id', $schedule) ->where('seat_id', $seat->seat) ->value('status'); @endphp
    2. @if($seat->seat_status == 1) @if($booking_status == 1) @elseif($booking_status > 1) @else {{-- --}} @endif @endif
    3. @endforeach
  2. @endif @endforeach