@extends('layouts.app') @section('title', 'Route Details') @section('content')
{{ $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) @foreach($route->multiSegments as $segment) {{ $segment->fromCity->code ?? '-' }}-{{ $segment->toCity->code ?? '-' }} ({{ $segment->segment_direction->value }}) @endforeach @else - @endif @else {{ $route->fromCity->code ?? '-' }}-{{ $route->toCity->code ?? '-' }} @if($route->route_type->value === 'round') -{{ $route->returnCity->code ?? '-' }} @endif @endif
{{ $transit->transitCity->code ?? '-' }} - {{ str_pad($hours, 2, '0', STR_PAD_LEFT) }}:{{ str_pad($minutes, 2, '0', STR_PAD_LEFT) }}
@endforeach{{ $route->created_at->format('M d, Y H:i') }}
{{ $route->updated_at->format('M d, Y H:i') }}