just sanity check: do you have Illuminate\Notifications\Notifiable trait in User model?
if so, does also getting all (not just unread) notifications auth()->user()->notifications show nothing?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
laravel notification are saved successfully in the notifications table but when I try displaying using $notifications = auth()->user()->unreadNotifications; nothing displays even though there is data in, I have also check the ID in the users table existence in notifiable_id field in notifications table, the User model is set up correctly to use the Notifiable trait but still not working. Table structure for notifications table is below
CREATE TABLE notifications (
id char(36) NOT NULL,
type varchar(255) NOT NULL,
notifiable_type varchar(255) NOT NULL,
notifiable_id bigint(20) unsigned NOT NULL,
data text NOT NULL,
read_at timestamp NULL DEFAULT NULL,
created_at timestamp NULL DEFAULT NULL,
updated_at timestamp NULL DEFAULT NULL,
PRIMARY KEY (id),
KEY notifications_notifiable_type_notifiable_id_index (notifiable_type,notifiable_id)
);
Please or to participate in this conversation.