@extends('layout.app') @section('content') @php // LOGIKA BARU: Ambil nama role user menggunakan relasi pivot $user = auth()->user(); $userRole = 'Anggota'; 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