소스 검색

学员channel列表只显示参课的

visuddhinanda 2 년 전
부모
커밋
f3f9579648
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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();