@foreach (DashboardMenu::getAll('vendor') as $item) @continue(! $item['name']) @php $hasChildren = !empty($item['children']) && $item['children']->isNotEmpty(); $isParentActive = $item['active'] || ($hasChildren && $item['children']->contains('active', true)); @endphp
  • $hasChildren])> $isParentActive, 'submenu-toggle' => $hasChildren ]) @if($hasChildren) data-bs-toggle="collapse" data-bs-target="#menu-{{ Str::slug($item['id']) }}" aria-expanded="{{ $isParentActive ? 'true' : 'false' }}" @endif > {{ $item['name'] }} @if($hasChildren) @endif @if($hasChildren)
      @foreach($item['children'] as $child) @continue(! $child['name'])
    • $child['active']]) > {{ $child['name'] }}
    • @endforeach
    @endif
  • @endforeach