From ebc6d21ba6c19df58ce330019db3bce61bdfb05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 4 Jan 2022 18:38:08 +0100 Subject: [PATCH] notification: order notification by date desc in inbox and sent --- .../ChillMainBundle/Repository/NotificationRepository.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php index e2452dced..38262f95e 100644 --- a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php @@ -116,6 +116,8 @@ final class NotificationRepository implements ObjectRepository $query = $query->setFirstResult($offset); } + $query->addOrderBy('n.date', 'DESC'); + return $query->getQuery()->getResult(); } @@ -131,6 +133,8 @@ final class NotificationRepository implements ObjectRepository $query = $query->setFirstResult($offset); } + $query->addOrderBy('n.date', 'DESC'); + return $query->getQuery()->getResult(); }