@php $i = 1; $length = count($bus_seats); $booking_status = 0; @endphp @foreach($bus_seats as $i => $busSeat) @if($route == 69 || $route == 70 || $route == 75 || $route == 76 || $route == 81 || $route == 82) @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 @else @if($i === $length)
    1. @foreach($busSeat as $seat)
    2. @if($seat->seat_status == 1) @if($seat->booking_status == 1) @elseif($seat->booking_status > 1) @else @endif @endif
    3. @endforeach
  3. @else
    1. @foreach($busSeat as $seat)
    2. @if($seat->seat_status == 1) @if($seat->booking_status == 1) @elseif($seat->booking_status > 1) @endif @endif
    3. @endforeach
  4. @endif @endif @endforeach