@php $items = app(\App\Services\Common\MenuService::class)->generate(); $isAdmin = \Auth::user()?->isAdmin(); $user = \Auth::user(); @endphp @foreach ($items as $key => $item) @php $theme = $item['type'] === 'item' ? 'classic' : 'default'; @endphp @if (data_get($item, 'is_admin')) @if ($isAdmin && $user->checkPermission($key)) @if (data_get($item, 'show_condition', true) && data_get($item, 'is_active')) @if ($item['children_count']) @includeIf($theme . '.components.navbar.partials.types.item-dropdown') @else @includeIf($theme . '.components.navbar.partials.types.' . $item['type']) @endif @endif @endif @else @if (data_get($item, 'show_condition', true) && data_get($item, 'is_active')) @if ($item['children_count']) @includeIf($theme . '.components.navbar.partials.types.item-dropdown') @else @includeIf($theme . '.components.navbar.partials.types.' . $item['type']) @endif @endif @endif @endforeach {{-- Admin menu items --}} @if (Auth::user()->isAdmin()) @if ($app_is_not_demo) @includeIf('premium-support.index') @endif @endif