@php use Carbon\Carbon; use App\Helpers\HelperFunctions; @endphp @if (!empty($flightData) && isset($flightData['legs'])) @php $legs = $flightData['legs']; $paxCount = $paxCount ?? 1; $hasFlights = false; @endphp @foreach ($legs as $legIndex => $flights) @php $firstFlight = $flights->first(); if (!$firstFlight) { continue; } $from = $firstFlight['departure']['code'] ?? ''; $to = $firstFlight['arrival']['code'] ?? ''; $date = Carbon::parse($firstFlight['departure']['datetime'])->format('D, d M Y'); $legHasAirblue = false; @endphp
{{ $firstSegment['carrier'] }} ({{ $firstSegment['flight_number'] }})
{{ $flightDep['airport'] }} ({{ $flightDep['code'] }}) - @if ($flight['isConnected']) {{ $stopCount }} {{ $stopCount > 1 ? 'Stops' : 'Stop' }} @else Nonstop @endif - {{ $flightArr['airport'] }} ({{ $flightArr['code'] }})
{{ Carbon::parse($segment['departure']['datetime'])->format('h:i A') }}
{{ $segment['departure']['airport'] }} ({{ $segment['departure']['code'] }}){{ Carbon::parse($segment['arrival']['datetime'])->format('h:i A') }}
{{ $segment['arrival']['airport'] }} ({{ $segment['arrival']['code'] }})Flight No
{{ $segment['carrier'] }}-{{ $segment['flight_number'] }}Cabin Class
{{ $flight['cabinClass'] }}No flights available.
@endforelseLoading bundles...
No airblue flights available for this leg.
@endif @endforelse