@php // LOGIKA BARU: Deteksi multi-role dari tabel perantara (pivot) roles() $user = auth()->user(); $userRole = 'Anggota'; // Default fallback if ($user && $user->anggota) { if ($user->anggota->roles->contains('nama_role', 'Pengurus')) { $userRole = 'Pengurus'; } elseif ($user->anggota->roles->contains('nama_role', 'Pelatih')) { $userRole = 'Pelatih'; } } @endphp