@php
$user = auth()->user();
$notifications = $user->notifications;
$unread = $user->unreadNotifications;
@endphp
Debug Notifications
User ID: {{ $user->id }}
User Name: {{ $user->name }}
User Class: {{ get_class($user) }}
Connection: {{ $user->getConnectionName() }}
Unread Notifications (Count: {{ $unread->count() }})
@foreach($unread as $n)
-
ID: {{ $n->id }}
Type: {{ $n->type }}
Notifiable Type: {{ $n->notifiable_type }}
Notifiable ID: {{ $n->notifiable_id }}
Created At: {{ $n->created_at }}
@endforeach
All Notifications (Count: {{ $notifications->count() }})
{{ json_encode($notifications->toArray(), JSON_PRETTY_PRINT) }}