@csrf
Lower numbers appear first.
title ?? '') }}'>
slug ?? '') }}' placeholder='e.g. dubai-honeymoon-special'>
@php // Primary destination first, then the rest of the tagged ones, so the // saved primary survives a round-trip through the ordered picker. $selectedDestinationIds = array_map('strval', old('destination_ids', isset($item) ? collect([$item->destination_id])->concat($item->destinations->pluck('id'))->filter()->unique()->values()->all() : [])); @endphp {{-- The name is dropped by JS once the ordered picker takes over; keeping it here means the field still submits (in DOM order) if the CDN ever fails. --}} {{-- Hidden inputs mirror the picker in selection order; a native multiple select always submits in DOM order, which would lose the primary pick. --}}
duration_days ?? '') }}'>
durationNightsOrDefault() : '') }}'> Shown on the website as e.g. "4 Days 3 Nights".
@php $selectedMode = old('tour_mode', $item->tour_mode ?? \App\Models\TourPackage::MODE_INDIVIDUAL); @endphp
Individual = sold per party (minimum persons). Tour arrangement = one fixed departure everyone joins (shared seats).
{{-- Individual tours have no shared seat pool — only the smallest party the tour runs for. --}}
min_persons ?? 2) }}'> e.g. 2 — the tour will not run for fewer.
{{-- Tour arrangements sell out of one shared pool; no minimum, one joiner is fine. --}}
capacity ?? '') }}'>
available_seats ?? '') }}'> Leave blank on a new package to start at full capacity.
booking_deadline ? $item->booking_deadline->format('Y-m-d') : '') }}'>

Upcoming Event

Ticked packages appear in the home page's Upcoming Events section, soonest departure first, and drop out by themselves the day after they depart. They stay in the normal package list too.

Any package with a departure date is hidden from the whole website once that date has passed — listings, its detail page, search, saved packages and booking. Leave the date blank for packages that run all year.

departure_date ? $item->departure_date->format('Y-m-d') : '') }}'> @error('departure_date')
{{ $message }}
@enderror
is_upcoming_event ?? false) ? 'checked' : '' }}>
event_priority ?? 0) }}'> Higher shows first; ties go to the soonest departure.
Admins can still book when website booking is disabled.

Price matrix

One row per person count and pick time, with the price each person pays at every hotel type. Pick times come from the Pick Time Setup on the destinations selected above; a row left on Any date is the rate used whenever no pick time matches, so the usual setup is one Any-date row per person count, with seasonal rows layered on top. Leave a hotel type's price blank to not sell that hotel type for the row. Once this matrix has any price it is the only thing that prices the package — a combination with no rate cannot be booked. Leave it empty to sell at the flat adult price.

@php $hotelCategories = \App\Support\HotelCategories::ALL; // Stored as one rate per hotel type; shown as one row per (pick time, persons) // with a price column per hotel type. $priceRows = old('prices', isset($item) ? $item->prices ->groupBy(fn ($price) => ($price->destination_pick_time_id ?? '').'|'.$price->persons) ->map(fn ($group) => [ 'destination_pick_time_id' => $group->first()->destination_pick_time_id, 'persons' => $group->first()->persons, 'rates' => $group->mapWithKeys(fn ($price) => [$price->hotel_category => $price->price_per_person])->all(), ]) ->values() ->all() : []); $priceRows = is_array($priceRows) ? $priceRows : []; $nextPriceIndex = $priceRows ? ((int) max(array_keys($priceRows))) + 1 : 0; // Every window is rendered in every row so a saved value always has an option // to sit in; the script below hides the ones whose destination is not selected. $pickTimeGroups = $destinations ->filter(fn ($destination) => ($pickTimesByDestination[$destination->id] ?? collect())->isNotEmpty()) ->values(); // The same select, as a string the "Add price row" script stamps an index into. $pickTimeSelectTemplate = ''; @endphp
@foreach ($hotelCategories as $label) @endforeach @foreach ($priceRows as $i => $row) @foreach ($hotelCategories as $slug => $label) @endforeach @endforeach
Person Pick Time{{ $label }} / person
@error("prices.$i.persons"){{ $message }}@enderror @error("prices.$i.destination_pick_time_id"){{ $message }}@enderror @error("prices.$i.rates.$slug"){{ $message }}@enderror

No rows: this package keeps pricing from the section above.

adult_price ?? 0) }}'>
child_price ?? 0) }}'>
infant_price ?? 0) }}'>
seasonal_price ?? 0) }}'>
offer_price ?? 0) }}'>
agent_price ?? 0) }}'>
corporate_price ?? 0) }}'>
video_url ?? '') }}'>
is_featured ?? false) ? 'checked' : '' }}>

SEO
seo_title ?? '') }}'>
seo_keywords ?? '') }}'>

Day-by-day itinerary (optional)

Leave this empty if the package has no fixed itinerary. Otherwise add each day once, then add as many events inside it as that day has — transfers, check-in, sightseeing, meals — each with its own time, place and duration. Events show on the website in the order listed here.

@php $itineraryDays = old('itineraries', isset($item) ? $item->itineraries->map(fn ($day) => [ 'day_no' => $day->day_no, 'title' => $day->title, 'details' => $day->details, 'events' => $day->events->map(fn ($event) => [ 'time' => $event->time ? substr($event->time, 0, 5) : '', 'icon' => $event->icon, 'title' => $event->title, 'location' => $event->location, 'duration' => $event->duration, 'description' => $event->description, ])->all(), ])->all() : []); @endphp
@foreach ($itineraryDays as $d => $day) @include('admin.tour-packages._itinerary_day', ['d' => $d, 'day' => $day]) @endforeach

Package images

Upload up to 20 images at once. Select one image as the List image; it appears on package cards and is shown first in the website gallery.

@if (isset($item) && $item->images->isNotEmpty())
@foreach ($item->images as $image)
Package gallery image
images->firstWhere('is_list_image', true)?->id) == $image->id)>
@endforeach
@endif
@if ($errors->any())
@endif @include('admin.partials._richtext') @push('styles') @endpush @push('scripts') @endpush @push('styles') @endpush @push('scripts') @endpush