@include('Partials.sidebar') @include('Partials.header') @if ($errors->any()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif Our Team Leadership Section Our Team Leadership Section Form @csrf Section Title: Leadership Cards: @php $slideContents = json_decode($ourTeamLeadershipSection->leaders, true); @endphp @foreach ($slideContents as $index => $slides_content) Name: Position: Email: @php // If section_description doesn't exist or is empty, create one empty field $cardDescriptions = $slides_content['section_description'] ?? ['']; if (empty($cardDescriptions)) { $cardDescriptions = ['']; } @endphp @foreach ($cardDescriptions as $Descriptionindex => $card_description) @if ($card_description) Descriptions: {{ $card_description ?? '' }} Remove Add Description @else Descriptions: Remove Add Description @endif @endforeach Image *Dimension: 436px X 513px @if (isset($slides_content['image']) && !empty($slides_content['image'])) @else @endif Choose Image Remove Card @endforeach Add New Card {{ isset($ourTeamLeadershipSection) ? 'Update' : 'Submit' }} @include('Partials.footer')