@php
$unreadNotifications = $user?->unreadNotifications()->take(5)->get() ?? collect();
$unreadCount = $user?->unreadNotifications()->count() ?? 0;
@endphp
@if($unreadCount > 0)
{{ $unreadCount }}
@endif
@if($unreadNotifications->isEmpty())
@else
Notifications
@foreach($unreadNotifications as $notification)
{{ data_get($notification->data, 'issue_category', 'Notification') }}
{{ data_get($notification->data, 'message', '') }}
{{ $notification->created_at->diffForHumans() }}
@endforeach
@endif
{{ $user->initials() }}
{{$user->name}}
{{$user->email}}