diff --git a/app/controller/IndexController.php b/app/controller/IndexController.php index f9b026d..0d7b7f7 100644 --- a/app/controller/IndexController.php +++ b/app/controller/IndexController.php @@ -61,4 +61,14 @@ class IndexController return json(['code' => 1, 'msg' => $e->getMessage()]); } } + + + // test function + public function test(Request $request) + { + $user = User::find(1); + $user->roles()->sync([1]); + $user->systems()->sync([1]); + return json(['code' => 0, 'msg' => 'success']); + } } \ No newline at end of file