Ver Fonte

数量支持课程

visuddhinanda há 2 anos atrás
pai
commit
5f484ba805
1 ficheiros alterados com 2 adições e 2 exclusões
  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();