@if ($title_group && $title_group != '-')
  1. {{ $title_group }}
  2. @endif
  3. {{ $title_menu }}
{{ $title }} {{ $title_menu }}
    • @php $user = auth()->user(); $unreadCount = $user ? $user->unreadNotifications->count() : 0; $notifs = $user ? $user->notifications()->latest()->take(5)->get() : collect(); @endphp {{-- Notification Bell --}}
    • @if ($unreadCount > 0) {{ $unreadCount > 9 ? '9+' : $unreadCount }} @endif {{-- Dropdown panel --}}
      {{-- Header --}}
      Notifikasi @if ($unreadCount > 0) {{ $unreadCount > 9 ? '9+' : $unreadCount }} @endif @if ($unreadCount > 0) Tandai semua dibaca @endif
      {{-- Scrollable body --}}
      @forelse($notifs as $n) @php $isUnread = is_null($n->read_at); $payload = $n->data; @endphp {{-- Icon --}}
      {{-- Text --}}

      {{ $payload['message'] ?? 'Pemberitahuan baru' }}

      {{ $n->created_at->diffForHumans() }}

      {{-- Unread dot --}} @if ($isUnread) @endif
      @if (!$loop->last)
      @endif @empty

      Tidak ada kegiatan terbaru

      @endforelse
      {{-- Footer --}}
      Lihat semua notifikasi
    • {{-- Profile --}}
    • {{ $user_login->firstname }}
      • Akun Saya
      • Ganti Password
      • @csrf Log out