From 731b00571c95e5a29c7b9036223cf8afecbeb55b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 30 May 2015 13:57:39 +0930 Subject: [PATCH] Eager load notification relationships --- framework/core/src/Api/Actions/Notifications/IndexAction.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Api/Actions/Notifications/IndexAction.php b/framework/core/src/Api/Actions/Notifications/IndexAction.php index 4a23c05aa..c7cfd6011 100644 --- a/framework/core/src/Api/Actions/Notifications/IndexAction.php +++ b/framework/core/src/Api/Actions/Notifications/IndexAction.php @@ -73,6 +73,7 @@ class IndexAction extends SerializeCollectionAction $user->markNotificationsAsRead()->save(); - return $this->notifications->findByUser($user, $request->limit, $request->offset); + return $this->notifications->findByUser($user, $request->limit, $request->offset) + ->load($request->include); } }