浏览代码

Update discover controller

Daniel Supernault 6 年之前
父节点
当前提交
5ab2fe1090
共有 1 个文件被更改,包括 1 次插入0 次删除
  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')
           ->whereVisibility('public')
           ->where('profile_id', '!=', $pid)
           ->where('profile_id', '!=', $pid)
           ->whereNotIn('profile_id', $following)
           ->whereNotIn('profile_id', $following)
+          ->withCount(['comments', 'likes'])
           ->orderBy('created_at', 'desc')
           ->orderBy('created_at', 'desc')
           ->simplePaginate(21);
           ->simplePaginate(21);