From 5c09dcd523a351e72f23902d008efd1b47289bea Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 20 Jul 2015 18:20:34 +0930 Subject: [PATCH] Fix new notifications on old subjects not appearing --- .../core/src/Core/Notifications/NotificationRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Core/Notifications/NotificationRepository.php b/framework/core/src/Core/Notifications/NotificationRepository.php index d0beaf007..8977bea65 100644 --- a/framework/core/src/Core/Notifications/NotificationRepository.php +++ b/framework/core/src/Core/Notifications/NotificationRepository.php @@ -22,7 +22,7 @@ class NotificationRepository ->whereIn('type', $user->getAlertableNotificationTypes()) ->where('is_deleted', false) ->groupBy('type', 'subject_id') - ->latest('time') + ->orderByRaw('MAX(time) DESC') ->skip($offset) ->take($limit);