Edit Destination
@php $errorKeys = collect($errors->getBag('default')->keys()); $basicErrorFields = ['name', 'slug', 'airport_code', 'image', 'main_image', 'description']; $contentErrorPrefixes = ['adventure_', 'culture_', 'beach_', 'food_']; $additionalErrorPrefixes = ['flights', 'deleted_flight_ids', 'things_to_know', 'faq_']; $basicSectionHasErrors = $errorKeys->contains(fn ($key) => in_array($key, $basicErrorFields, true)); $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))); $initialStep = $additionalSectionHasErrors ? 'additional' : ($contentSectionHasErrors ? 'content' : 'basic'); $initialContentTab = 'adventure'; foreach (['adventure' => 'adventure_', 'culture' => 'culture_', 'beach' => 'beach_', 'food' => 'food_'] as $tab => $prefix) { if ($errorKeys->contains(fn ($key) => str_starts_with($key, $prefix))) { $initialContentTab = $tab; break; } } $initialExtrasTab = $errorKeys->contains(fn ($key) => str_starts_with($key, 'flights') || $key === 'deleted_flight_ids') ? 'flights' : ($errorKeys->contains(fn ($key) => str_starts_with($key, 'faq_')) ? 'faqs' : 'tips'); $featuredUrl = $destination->image ? asset('storage/' . $destination->image) : null; $mainUrl = $destination->main_image ? asset('storage/' . $destination->main_image) : null; $destLabel = 'mb-2 block text-sm font-semibold text-gray-700'; $destHint = 'mt-1.5 text-xs text-gray-500'; $destInput = 'w-full rounded-xl border border-gray-300 bg-white px-4 py-3 text-gray-800 transition focus:border-[#853874] focus:outline-none focus:ring-4 focus:ring-[#853874]/10'; $destDropzone = 'relative flex min-h-40 cursor-pointer flex-col items-center justify-center gap-2 overflow-hidden rounded-2xl border-[1.5px] border-dashed border-gray-300 bg-[#f8f5f9] p-5 text-center transition hover:border-[#853874] hover:bg-[#f3eaf2]'; $destFileOverlay = 'absolute inset-0 cursor-pointer opacity-0'; $destErrorDot = 'inline-block h-2 w-2 shrink-0 rounded-full bg-amber-400 shadow-[0_0_0_2px_rgba(255,255,255,0.85)]'; $destTabError = 'mt-1 text-[11px] font-bold text-amber-700'; $destErrorItem = 'flex w-full cursor-pointer items-center justify-between gap-3 rounded-xl border border-amber-300 bg-white px-3 py-2.5 text-left text-sm font-semibold text-amber-900 transition hover:border-amber-600 hover:bg-orange-50'; $destErrorSection = 'mb-1.5 text-[11px] font-extrabold uppercase tracking-wider text-amber-700'; $storedFlightRows = $destination->flights->map(static fn ($flight) => [ 'id' => $flight->id, 'from' => $flight->from, 'airline_id' => $flight->airline_id, 'airline' => $flight->airline, 'class' => $flight->class, 'price' => $flight->price, 'sort_order' => $flight->sort_order, 'active' => (bool) $flight->active, ])->values()->all(); $flightFormRows = old('flights', $storedFlightRows); if (! is_array($flightFormRows)) { $flightFormRows = $storedFlightRows; } $deletedFlightIds = old('deleted_flight_ids', []); if (! is_array($deletedFlightIds)) { $deletedFlightIds = []; } @endphp
Back to destinations

Edit {{ $destination->name }}

Update details in simple steps. Save anytime from the bar below.

@unless($destination->is_draft) View page @endunless
@csrf @method('PUT')
@include('admin.destinations.partials.error-pane') @include('admin.destinations.partials.step-nav')

Destination details

Name, URL, and airport used for flight search.

@error('name')@enderror

Used in the URL: /destinations/

@error('slug')@enderror
@error('airport_code')@enderror

Photos

Upload a new file only if you want to replace the current image.

@error('image')@enderror
@error('main_image')@enderror

Description *

@error('description')@enderror

Visibility

Active
Visible on the website
Featured
Highlight on the homepage
@include('admin.destinations.partials.highlights-panel')
@include('admin.destinations.partials.extras-panel', [ 'includeFlights' => true, 'destinationName' => $destination->name, 'destinationAirportCode' => $destination->airport_code, ])