瀏覽代碼

数量支持课程

visuddhinanda 1 年之前
父節點
當前提交
5f484ba805
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Http/Controllers/DiscussionController.php

+ 2 - 2
app/Http/Controllers/DiscussionController.php

@@ -128,11 +128,11 @@ class DiscussionController extends Controller
                             }
                     }
                 }
-                $activeNumber = Discussion::where('res_id',$request->get('id'))
+                $activeNumber = Discussion::whereIn('res_id',$resId)
                                             ->where('parent',null)
                                             ->where('type', $request->get('type','discussion'))
                                             ->where('status','active')->count();
-                $closeNumber = Discussion::where('res_id',$request->get('id'))
+                $closeNumber = Discussion::whereIn('res_id',$resId)
                                             ->where('parent',null)
                                             ->where('type', $request->get('type','discussion'))
                                             ->where('status','close')->count();