@csrf
name ?? '') }}'> @error('name'){{ $message }}@enderror
@error('description'){{ $message }}@enderror
@error('long_description'){{ $message }}@enderror
@error('image'){{ $message }}@enderror @if(!empty($item->image)) @endif
climate ?? '') }}'>
currency ?? '') }}'>
language ?? '') }}'>
best_time_to_visit ?? '') }}'>

Pick Time Setup

Named travel windows for this destination — they are listed on the website destination page. Leave a row's name blank to drop it.

@php // old() wins after a failed validation pass so nothing typed is lost; otherwise // the saved rows, and always at least one empty row to type into. $pickTimes = old('pick_times', isset($item) ? $item->pickTimes->map(fn ($pt) => [ 'name' => $pt->name, 'start_date' => $pt->start_date?->format('Y-m-d'), 'end_date' => $pt->end_date?->format('Y-m-d'), ])->all() : []); // old() hands back whatever was posted, so it is not trusted to be well shaped. $pickTimes = is_array($pickTimes) ? $pickTimes : []; $pickTimes = $pickTimes ?: [['name' => '', 'start_date' => '', 'end_date' => '']]; // Rows removed before a failed submit leave gaps in the keys, so the next // index has to come from the highest one used, not from the row count. $nextPickTimeIndex = ((int) max(array_keys($pickTimes))) + 1; @endphp
@foreach ($pickTimes as $i => $pt)
@error("pick_times.$i.name"){{ $message }}@enderror
@error("pick_times.$i.start_date"){{ $message }}@enderror
@error("pick_times.$i.end_date"){{ $message }}@enderror
@endforeach
sort_order ?? 0) }}'> 1 first, 0 = unranked. Also picks the home page's top 4 "Popular Destinations". @error('sort_order'){{ $message }}@enderror
is_popular ?? false) ? 'checked' : '' }}>
show_in_ship_menu ?? false) ? 'checked' : '' }}>
@include('admin.partials._richtext') @push('scripts') @endpush