Explorar o código

学员channel列表只显示参课的

visuddhinanda hai 1 ano
pai
achega
f3f9579648
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/Http/Api/CourseApi.php

+ 2 - 0
app/Http/Api/CourseApi.php

@@ -9,6 +9,8 @@ class CourseApi{
         $channels = [];
         $studentsChannel = CourseMember::where('course_id',$courseId)
                 ->whereNotNull('channel_id')
+                ->where('role','student')
+                ->whereIn('status',['joined','accepted','agreed'])
                 ->select('channel_id')
                 ->orderBy('created_at')
                 ->get();