diff --git a/src/Illuminate/Notifications/HasDatabaseNotifications.php b/src/Illuminate/Notifications/HasDatabaseNotifications.php index 807ebadc5005..c650bb8750b6 100644 --- a/src/Illuminate/Notifications/HasDatabaseNotifications.php +++ b/src/Illuminate/Notifications/HasDatabaseNotifications.php @@ -22,4 +22,14 @@ public function unreadNotifications() ->whereNull('read_at') ->orderBy('created_at', 'desc'); } + + /** + * Get the entity's read notifications. + */ + public function readNotifications() + { + return $this->morphMany(DatabaseNotification::class, 'notifiable') + ->whereNotNull('read_at') + ->orderBy('created_at', 'desc'); + } }