Bug-fix-patch-12

# fixed notifications
This commit is contained in:
Manish Verma
2016-12-28 09:42:55 +05:30
parent 5ea755fb55
commit 1667e5fdb0

View File

@@ -151,11 +151,9 @@ 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) {
$query->select('id', 'message', 'type');
@@ -164,8 +162,7 @@ class NotificationController extends Controller
}, 'notification.model' => function($query) {
$query->select('id', 'ticket_number');
},
])->where('id', '=', \Auth::user()->id);
])->where('user_id', '=', \Auth::user()->id);
return $notifications;
}
}