main_logo {{ @$setup_app->appname }}

    {{-- LOOPING GMENU --}} @foreach ($gmenu as $g) @if ($g->gmenu == 'blankx') {{-- Query DMenu --}} @php $querydmenu = DB::table('sys_dmenu') ->join('sys_auth', 'sys_dmenu.dmenu', '=', 'sys_auth.dmenu') ->whereIn('sys_auth.idroles', $users_rules) ->where('sys_dmenu.isactive', '1') ->where('sys_dmenu.show', '1') ->where('sys_auth.isactive', '1') ->where('sys_dmenu.gmenu', $g->gmenu) ->select('sys_dmenu.*') ->distinct() ->orderBy('sys_dmenu.urut', 'asc') ->get(); @endphp @foreach ($querydmenu as $d)
  • {{ $d->name }} {{-- Special handling for notifications --}} @if ($d->url == 'notifications') @php // Get current user $currentUser = \App\Models\User::find(session('username')); if ($currentUser) { // Count unread notifications (excluding user's own actions) $unreadCount = \App\Models\Activity::where('user_id', $currentUser->id) ->where('user_create', '!=', session('username')) ->where('is_read', false) ->where('isactive', '1') ->count(); } else { $unreadCount = 0; } @endphp @if ($unreadCount > 0) {{ $unreadCount }} @endif @elseif ($d->notif != '') @php // get notif $data_notif = DB::select($d->notif); foreach ($data_notif as $n) { $notif = $n->notif; } @endphp {{ $notif }} @endif
  • @endforeach @else
  • name == $title_group ? 'aria-expanded=true' : '' }}>
    {{ $g->name }}
      {{-- Query DMenu --}} @php $querydmenu = DB::table('sys_dmenu') ->join('sys_auth', 'sys_dmenu.dmenu', '=', 'sys_auth.dmenu') ->whereIn('sys_auth.idroles', $users_rules) ->where('sys_dmenu.isactive', '1') ->where('sys_dmenu.show', '1') ->where('sys_auth.isactive', '1') ->where('sys_dmenu.gmenu', $g->gmenu) ->select('sys_dmenu.*') ->distinct() ->orderBy('sys_dmenu.urut', 'asc') ->get(); @endphp @foreach ($querydmenu as $d)
    • {{ $d->name }} {{-- Special handling for notifications --}} @if ($d->url == 'notifications') @php // Get current user $currentUser = \App\Models\User::find(session('username')); if ($currentUser) { // Count unread notifications (excluding user's own actions) $unreadCount = \App\Models\Activity::where( 'user_id', $currentUser->id, ) ->where('user_create', '!=', session('username')) ->where('is_read', false) ->where('isactive', '1') ->count(); } else { $unreadCount = 0; } @endphp @if ($unreadCount > 0) {{ $unreadCount }} @endif @elseif ($d->notif != '') @php // get notif $data_notif = DB::select($d->notif); foreach ($data_notif as $n) { $notif = $n->notif; } @endphp {{ $notif }} @endif
    • @endforeach
  • @endif @endforeach