SLCC
@auth Dashboard @endauth Dashboard
@guest Login Register @else

{{ Auth::user()->name }}

Dashboard Profil Saya @php $u = Auth::user(); $isAdminDropdown = false; if (method_exists($u, 'isSuperAdmin')) { try { $isAdminDropdown = $u->isSuperAdmin(); } catch (\Exception $e) {} } if (!$isAdminDropdown && method_exists($u, 'isAdmin')) { try { $isAdminDropdown = $u->isAdmin(); } catch (\Exception $e) {} } if (!$isAdminDropdown && method_exists($u, 'hasAnyRole')) { try { $isAdminDropdown = $u->hasAnyRole(['admin','superadmin']); } catch (\Exception $e) {} } if (!$isAdminDropdown && isset($u->roles)) { try { $isAdminDropdown = $u->roles->whereIn('name', ['admin','superadmin'])->isNotEmpty(); } catch (\Exception $e) {} } if (!$isAdminDropdown) { $roleAttr = strtolower($u->role ?? ''); $isAdminDropdown = in_array($roleAttr, ['admin','superadmin']); } @endphp @if($isAdminDropdown) Pengaturan @endif @php $apkPath = \App\Models\Setting::get('app_apk_path'); @endphp @if($apkPath) Download APK @endif Scan QR Code

@csrf
@endguest
@auth @endauth
@auth
@php $user = Auth::user(); $photoPath = null; $defaultPhoto = asset('assets/images/profilefoto/default-profile.png'); if ($user->profile && $user->profile->foto && file_exists(public_path('assets/images/profilefoto/' . $user->profile->foto))) { $photoPath = asset('assets/images/profilefoto/' . $user->profile->foto); } else { $photoPath = $defaultPhoto; } @endphp {{ $user->name }}

{{ $user->name }}

{{ $user->role }}

Dashboard Profil Saya @if(Auth::user()->role === 'superadmin' || Auth::user()->role === 'admin') Pengaturan @endif @php $apkPath = \App\Models\Setting::get('app_apk_path'); @endphp @if($apkPath) Download APK @endif Scan QR Code
@csrf
@else Login Register @endauth
Scan QR Code