@php /** @var \App\Models\Airline $airline */ /** @var \Illuminate\Support\Collection|\App\Models\Flight[] $flightDeals */ // Prepare flight deals data for JavaScript $preparedFlightDeals = collect($flightDeals ?? []) ->sortBy('sort_order') ->values() ->map(function ($f) { return [ 'from' => $f->from, 'to' => $f->to, 'class' => $f->class, 'price' => (float) $f->price, 'active' => (bool) $f->active, ]; }) ->pad(4, ['from' => '', 'to' => '', 'class' => 'Economy', 'price' => '', 'active' => false]) ->take(4) ->toArray(); $errorKeys = collect($errors->getBag('default')->keys()); $basicErrorFields = ['name', 'code', 'slug', 'logo', 'featured_image', 'main_description', 'main_image', 'promo_banner']; $dealsErrorPrefixes = ['flight_deals']; $contentErrorPrefixes = ['class_', 'class_images']; $additionalErrorPrefixes = ['faq_']; $basicSectionHasErrors = $errorKeys->contains(fn ($key) => in_array($key, $basicErrorFields, true)); $dealsSectionHasErrors = $errorKeys->contains(fn ($key) => collect($dealsErrorPrefixes)->contains(fn ($prefix) => str_starts_with($key, $prefix))); $contentSectionHasErrors = $errorKeys->contains(fn ($key) => collect($contentErrorPrefixes)->contains(fn ($prefix) => str_starts_with($key, $prefix))); $additionalSectionHasErrors = $errorKeys->contains(fn ($key) => collect($additionalErrorPrefixes)->contains(fn ($prefix) => str_starts_with($key, $prefix))); @endphp Edit Airline
@csrf @method('PUT')
@error('name') @enderror

IATA or ICAO code (e.g., PAL, CEB, 5J)

@error('code') @enderror

Leave empty to auto-generate. Used in the URL: /airlines/[slug]

@error('slug') @enderror
@if($airline->logo)
Current logo

Current logo

@endif

{{ $airline->logo ? 'Upload a new logo to replace the current one (Max: 2MB)' : 'Airline logo shown on cards and the airline page (Max: 2MB)' }}

@error('logo') @enderror
@if($airline->featured_image)
Current featured image

Current featured image

@endif

Hero image for the airline page (Max: 2MB)

@error('featured_image') @enderror

Full description with rich text formatting.

@error('main_description') @enderror
@if($airline->main_image)
Current main image

Current main image

@endif

Image shown alongside the main description (Max: 2MB)

@error('main_image') @enderror
@if($airline->promo_banner)
Current promo banner

Current promo banner

@endif

Promotional banner image (Max: 2MB)

@error('promo_banner') @enderror
Active
Visible on the website

Flight Classes

Add class options with images and descriptions

No classes added yet. Click "+ Add Class" to get started.

Frequently Asked Questions

Common questions and answers about this airline

No FAQs added yet. Click "+ Add FAQ" to get started.