{{-- Shared Featured Properties dual-list picker — included inside BOTH create.blade.php and edit.blade.php's own
, so property_ids[] submits alongside title/body/etc in the exact same save action (see ContentPageController::syncFeaturedProperties()). Nothing here persists on its own — every add/remove/reorder only ever mutates the in-page `selected` array and the hidden inputs derived from it; saving the page is what actually attaches/detaches/reorders the pivot. Expects $attachedProperties (a Collection of Property, in display order — empty when creating a new page) and $attachedAvailability (a [property id => 'sold'|'rented'|'available'] map for those same properties — see ContentPageController::availabilityMap()). --}} @php $attachedAvailability = $attachedAvailability ?? []; $initialSelected = $attachedProperties->map(function ($property) use ($attachedAvailability) { return [ 'id' => $property->id, 'title' => $property->title, 'city' => $property->city, 'type' => \App\Models\Property::typeLabels()[$property->type] ?? $property->type, 'status' => $property->status, 'status_label' => \App\Models\Property::STATUS_LABELS[$property->status] ?? $property->status, 'availability_status' => $attachedAvailability[$property->id] ?? 'available', 'trashed' => $property->trashed(), ]; })->values(); @endphp
Featured Properties
Search across all properties (any status) and move the ones this page should feature into the right-hand list. Drag, or use the arrow buttons, to reorder — changes save together with the rest of this form.
Available properties
Featured (display order)
@push('scripts') @endpush