setName('apiadmin:adminRouter')->setDescription('自动构建后端路由'); } /** * php think apiadmin:adminRouter * @param Input $input * @param Output $output * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author zhaoxiang */ protected function execute(Input $input, Output $output): void { RouterTool::buildAdminRouter(); $output->info('路由构建成功'); } }