visuddhinanda 3 年 前
コミット
90925d40d2
1 ファイル変更18 行追加0 行削除
  1. 18 0
      app/Http/Api/GroupApi.php

+ 18 - 0
app/Http/Api/GroupApi.php

@@ -0,0 +1,18 @@
+<?php
+namespace App\Http\Api;
+use App\Models\GroupInfo;
+
+class GroupApi{
+    public static function getById($id){
+        $group = GroupInfo::where("uid",$id)->first();
+        if($group){
+            return [
+                    'id'=>$id,
+                    'name'=>$group->name,
+                ];
+        }else{
+            return false;
+        }
+    }
+
+}