@extends('layouts.app') @section('title', 'Routes') @section('content')
| ID | Airline | Route Type | Flight Type | Route | Transit Info | Actions |
|---|---|---|---|---|---|---|
| {{ $route->id }} | {{ $route->airline->name ?? '-' }} | @switch($route->route_type->value) @case('oneway_inbound') Oneway - Inbound @break @case('oneway_outbound') Oneway - Outbound @break @case('round') Round @break @case('multi_city') Multi City @break @default {{ $route->route_type->value ?? '-' }} @endswitch | {{ ucfirst($route->flight_type->value ?? '-') }} | @if($route->route_type->value === 'multi_city') @if($route->multiSegments->count() > 0) {{ $route->multiSegments->first()->fromCity->code ?? '-' }}-{{ $route->multiSegments->first()->toCity->code ?? '-' }} ... @else - @endif @else {{ $route->fromCity->code ?? '-' }}-{{ $route->toCity->code ?? '-' }} @if($route->route_type->value === 'round') -{{ $route->returnCity->code ?? '-' }} @endif @endif | @if($route->flight_type->value === 'transit' && $route->transits->count() > 0) @foreach($route->transits as $transit) @php $hours = floor($transit->transit_time / 60); $minutes = $transit->transit_time % 60; @endphp {{ $transit->transitCity->code ?? '-' }} ({{ str_pad($hours, 2, '0', STR_PAD_LEFT) }}:{{ str_pad($minutes, 2, '0', STR_PAD_LEFT) }}) @endforeach @else - @endif | |
| No routes found. Add one? | ||||||