zilong 4 年之前
父節點
當前提交
db968f3781
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      app/Http/Controllers/Api/V1/PatientController.php

+ 14 - 0
app/Http/Controllers/Api/V1/PatientController.php

xqd
@@ -57,6 +57,20 @@ class PatientController extends AuthController
         return out();
     }
 
+    public function submitCardImg()
+    {
+        $req = request()->post();
+        $this->validate(request(), [
+            'id' => 'required|integer',
+            'card_img_url' => 'required|url'
+        ]);
+        $user = $this->user;
+
+        Patient::where('id', $req['id'])->where('user_id', $user['id'])->update($req);
+
+        return out();
+    }
+
     public function patientList()
     {
         $user = $this->user;