From 1667e5fdb07fd4842448947e3a3bcd9a1836ff9c Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Wed, 28 Dec 2016 09:42:55 +0530 Subject: [PATCH] Bug-fix-patch-12 # fixed notifications --- .../Controllers/Common/NotificationController.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Common/NotificationController.php b/app/Http/Controllers/Common/NotificationController.php index 2507c2f7f..3ae311ab8 100644 --- a/app/Http/Controllers/Common/NotificationController.php +++ b/app/Http/Controllers/Common/NotificationController.php @@ -151,21 +151,18 @@ class NotificationController extends Controller /** * get the page to list the notifications. - * * @return response */ - public static function getNotifications() - { + public static function getNotifications() { $notifications = UserNotification::with([ - 'notification.type' => function ($query) { + 'notification.type' => function($query) { $query->select('id', 'message', 'type'); - }, 'users' => function ($query) { + }, 'users' => function($query) { $query->select('id', 'email', 'profile_pic'); - }, 'notification.model' => function ($query) { + }, 'notification.model' => function($query) { $query->select('id', 'ticket_number'); }, - ])->where('id', '=', \Auth::user()->id); - + ])->where('user_id', '=', \Auth::user()->id); return $notifications; } }