@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)
-
@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
-
@if($seat->seat_status == 1)
@if($booking_status == 1)
@elseif($booking_status > 1)
@else
{{-- --}}
@endif
@endif
@endforeach
@else
-
@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
-
@if($seat->seat_status == 1)
@if($booking_status == 1)
@elseif($booking_status > 1)
@else
{{-- --}}
@endif
@endif
@endforeach
@endif
@else
@if($i === $length)
-
@foreach($busSeat as $seat)
-
@if($seat->seat_status == 1)
@if($seat->booking_status == 1)
@elseif($seat->booking_status > 1)
@else
@endif
@endif
@endforeach
@else
-
@foreach($busSeat as $seat)
-
@if($seat->seat_status == 1)
@if($seat->booking_status == 1)
@elseif($seat->booking_status > 1)
@endif
@endif
@endforeach
@endif
@endif
@endforeach