@php $user = Auth::user(); $unreadCount = $user?->unreadNotifications->count() ?? 0; $recentNotifications = $user?->notifications()->latest()->take(5)->get() ?? collect(); @endphp
{{ __('Dashboard') }}
Recent notifications
@forelse ($recentNotifications as $notification)
{{ data_get($notification->data, 'message', data_get($notification->data, 'subject', 'New notification')) }}
{{ $notification->created_at?->diffForHumans() }}
@empty
No notifications yet.
@endforelse
{{ __('Profile') }}
@csrf {{ __('Log Out') }}
{{ __('Dashboard') }}
{{ Auth::user()->name }}
{{ Auth::user()->email }}
{{ __('Profile') }}
@csrf {{ __('Log Out') }}