zilong 4 years ago
parent
commit
27231433be
1 changed files with 14 additions and 0 deletions
  1. 14 0
      app/Http/Controllers/Api/V1/CommonController.php

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

xqd
@@ -339,4 +339,18 @@ class CommonController extends Controller
 
         return out(['token' => $token]);
     }
+
+    public function delServerFile()
+    {
+        $req = request()->post();
+        $this->validate(request(), [
+            'url' => 'required|url'
+        ]);
+
+        $tem = parse_url($req['url']);
+        $allPath = public_path().$tem['path'];
+        unlink($allPath);
+
+        return out();
+    }
 }