@if($landing->faq && count($landing->faq))

F.A.Q 's

Frequently asked questions ?

We have shared some of the most frequently asked questions to help you out.

{{-- Split the FAQs into two columns --}} @php $faqs = $landing->faq ?? []; $total = count($faqs); $half = (int) ceil($total / 2); $cols = array_chunk($faqs, $half); // Ensure we have exactly 2 arrays if (count($cols) === 1) { $cols[] = []; } @endphp {{-- LEFT column --}}
@foreach($cols[0] as $i => $f) @php $idx = $i; // index within left column $headingId = "heading_left_{$idx}"; $collapseId = "collapse_left_{$idx}"; $show = ($i === 0) ? 'show' : ''; $expanded = ($i === 0) ? 'true' : 'false'; @endphp

{!! nl2br(e($f['a'] ?? '')) !!}
@endforeach
{{-- RIGHT column --}}
@foreach($cols[1] as $j => $f) @php $idx = $j; // index within right column $headingId = "heading_right_{$idx}"; $collapseId = "collapse_right_{$idx}"; // do not auto-open right column first item to avoid two open items — optional: $show = ''; $expanded = 'false'; @endphp

{!! nl2br(e($f['a'] ?? '')) !!}
@endforeach
{{-- /.row --}}
{{-- /.container --}}
@endif