@php $lastGroup = 'Default'; $moreSectionStarted = false; @endphp @foreach ($attributeOptions as $treatment_id => $treatment_data) @if ($treatment_data['group_title'] !== $lastGroup) {{-- If we reach "Special looks", start the collapsible section --}} @if (!$moreSectionStarted && $treatment_data['group_title'] === 'Special looks') @php $moreSectionStarted = true; @endphp
More treatments
{{-- end .more-treatments-content --}}
{{-- end .more-treatments-wrapper --}} @endif