Hey,
How to I get the latest user, and not the first user that made a notification?
User is author
This is my code
$notifications = $this->modelsManager->createBuilder()
->columns(array('COUNT(*) as count', 'Notifications.type', 'Notifications.userid', 'Notifications.postid', 'Notifications.time', 'Users.firstname', 'Users.lastname', 'Users.profileimage', 'Posts.title', 'Posts.image'))
->from('Notifications')
->join('Users', 'Notifications.author = Users.id')
->leftJoin('Posts', 'Notifications.postid = Posts.id')
->groupBy(array('Notifications.postid', 'Notifications.type'))
->orderBy('Notifications.id DESC')
->getQuery()
->execute();
return $notifications;