Create New Airline @php $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))); $emptyFlightDeal = ['from' => '', 'to' => '', 'class' => 'Economy', 'price' => '', 'active' => false]; $createFlightDeals = collect(old('flight_deals', [])) ->map(function ($deal) use ($emptyFlightDeal) { $deal = array_merge($emptyFlightDeal, is_array($deal) ? $deal : []); $deal['active'] = filter_var($deal['active'] ?? false, FILTER_VALIDATE_BOOLEAN); return $deal; }) ->pad(4, $emptyFlightDeal) ->take(4) ->values() ->all(); @endphp
@csrf
@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

Airline logo shown on cards and the airline page (Max: 2MB)

@error('logo') @enderror

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

@error('featured_image') @enderror

Full description with rich text formatting.

@error('main_description') @enderror

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

@error('main_image') @enderror

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.