From 5ab2fe10901f83b3f0383b6e361f77bc7c7bc627 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 21 Sep 2018 23:44:33 -0600 Subject: [PATCH] Update discover controller --- app/Http/Controllers/DiscoverController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/DiscoverController.php b/app/Http/Controllers/DiscoverController.php index c01770dc9..5c910415e 100644 --- a/app/Http/Controllers/DiscoverController.php +++ b/app/Http/Controllers/DiscoverController.php @@ -60,6 +60,7 @@ class DiscoverController extends Controller ->whereVisibility('public') ->where('profile_id', '!=', $pid) ->whereNotIn('profile_id', $following) + ->withCount(['comments', 'likes']) ->orderBy('created_at', 'desc') ->simplePaginate(21);