visuddhinanda 1 год назад
Родитель
Сommit
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();