@php
$titles = $data['sections'] ?? [];
$descriptions = $data['descriptions'] ?? [];
$isEdit = isset($data['sections']) && isset($data['descriptions']);
@endphp
@php
$sections = [];
if ($isEdit) {
foreach ($titles as $i => $title) {
$sections[] = [
'title' => $title,
'description' => $descriptions[$i] ?? '',
];
}
} else {
$sections = [
[
'title' => 'Note',
'description' =>
'
- All changes and cancellation must be made 48hrs prior to arrival
- Rates are subject to change without prior notice and can only be guaranteed at the time of ticketing.
',
]
];
}
@endphp
@foreach ($sections as $index => $section)
@endforeach