Fix new notifications on old subjects not appearing

This commit is contained in:
Toby Zerner 2015-07-20 18:20:34 +09:30
parent 2dd0f88305
commit 5c09dcd523

View File

@ -22,7 +22,7 @@ class NotificationRepository
->whereIn('type', $user->getAlertableNotificationTypes()) ->whereIn('type', $user->getAlertableNotificationTypes())
->where('is_deleted', false) ->where('is_deleted', false)
->groupBy('type', 'subject_id') ->groupBy('type', 'subject_id')
->latest('time') ->orderByRaw('MAX(time) DESC')
->skip($offset) ->skip($offset)
->take($limit); ->take($limit);