visuddhinanda 1 year ago
parent
commit
0d8b33b6af
1 changed files with 7 additions and 0 deletions
  1. 7 0
      app/Http/Api/CourseApi.php

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

@@ -17,4 +17,11 @@ class CourseApi{
         }
         return $channels;
     }
+
+    public static function role($courseId,$userUid){
+        $role = CourseMember::where('course_id',$courseId)
+                            ->where('user_id')
+                            ->value('role');
+        return $role;
+    }
 }