From 6e798f3f75b7ed429cac187c8fb9aa83b336083e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 12 Nov 2018 21:46:16 -0700 Subject: [PATCH] Update AccountController --- app/Http/Controllers/AccountController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index a8cb6a95e..90938210e 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -64,10 +64,12 @@ class AccountController extends Controller ]); $profile = Auth::user()->profile; $action = $request->input('a'); + $allowed = ['like', 'follow']; $timeago = Carbon::now()->subMonths(3); $following = $profile->following->pluck('id'); $notifications = Notification::whereIn('actor_id', $following) - ->where('profile_id', '!=', $profile->id) + ->whereIn('action', $allowed) + ->where('actor_id', '<>', $profile->id) ->whereDate('created_at', '>', $timeago) ->orderBy('notifications.created_at', 'desc') ->simplePaginate(30);