@php $user = Auth::user(); $userInitials = $user ? strtoupper(substr($user->name, 0, 2)) : 'U'; $userRole = $user?->roles->first()?->name ?? 'User'; $unreadNotifications = $user ? $user->unreadNotifications()->latest()->take(5)->get() : collect(); $unreadNotificationCount = $user ? $user->unreadNotifications()->count() : 0; @endphp
@can('manage-patients') @else @endcan
@can('view-notifications')
@endcan