diff --git a/application/command/FreshAdminRouter.php b/application/command/FreshAdminRouter.php new file mode 100644 index 0000000..c8df1d4 --- /dev/null +++ b/application/command/FreshAdminRouter.php @@ -0,0 +1,29 @@ +setName('apiadmin:adminRouter')->setDescription('自动构建后端路由'); + } + + /** + * php think apiadmin:adminRouter + * @param Input $input + * @param Output $output + * @return int|void|null + * @throws \think\Exception + * @author zhaoxiang + */ + protected function execute(Input $input, Output $output) { + RouterTool::buildAdminRouter(); + $output->info('路由构建成功'); + } +}