Przeglądaj źródła

Update discover controller

Daniel Supernault 6 lat temu
rodzic
commit
5ab2fe1090
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      app/Http/Controllers/DiscoverController.php

+ 1 - 0
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);