From e37108c544abf9139f96203afd57079c4673084c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 29 May 2018 21:03:11 -0600 Subject: [PATCH] Update AccountController, fix hydrateNotifications() Notifications expect a collection, not a vanilla array. --- app/Http/Controllers/AccountController.php | 4 ++-- app/WebSub.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 app/WebSub.php diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 79f2d1c80..f2d1f4092 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -38,9 +38,9 @@ class AccountController extends Controller public function hydrateNotifications($keys) { $prefix = 'notification.'; - $notifications = []; + $notifications = collect([]); foreach($keys as $key) { - $notifications[] = Cache::get($prefix . $key); + $notifications->push(Cache::get("{$prefix}{$key}")); } return $notifications; } diff --git a/app/WebSub.php b/app/WebSub.php new file mode 100644 index 000000000..5be3ad93f --- /dev/null +++ b/app/WebSub.php @@ -0,0 +1,10 @@ +