@php $cp = $companyProfile; @endphp logo logo logo logo logo logo
{{--
  • Dashboard
  • Administrator
    • Manajemen Pengguna
--}}
    @foreach ($moduleMenus as $menu) @php $hasChildren = isset($menu['children']) && count($menu['children']) > 0; $icon = $menu['icon'] ?? 'bx bx-folder'; // Detect menu URL type $link = 'javascript:void(0);'; // default for parent if (isset($menu['route'])) { $link = route($menu['route']); } elseif (isset($menu['url'])) { $link = Str::startsWith($menu['url'], ['http://', 'https://']) ? $menu['url'] : url($menu['url']); } @endphp @php // Kumpulkan notif_key dari semua children untuk dot di parent $parentNotifKeys = []; if ($hasChildren) { foreach ($menu['children'] as $c) { if (!empty($c['notif_key'])) { foreach (explode(',', $c['notif_key']) as $k) { $parentNotifKeys[] = trim($k); } } } } @endphp
  • {{ $menu['title'] }} @if(count($parentNotifKeys)) @endif @if ($hasChildren) @endif {{-- CHILDREN --}} @if ($hasChildren)
      @foreach ($menu['children'] as $child) @php $childLink = '#'; if (isset($child['route'])) { $childLink = route($child['route']); } elseif (isset($child['url'])) { $childLink = Str::startsWith($child['url'], ['http://', 'https://']) ? $child['url'] : url($child['url']); } $childKeys = !empty($child['notif_key']) ? $child['notif_key'] : null; @endphp
    • {{ $child['title'] }} @if($childKeys) 0 @endif
    • @endforeach
    @endif
  • @endforeach