update:更新安装&新增本地模块安装

This commit is contained in:
JaguarJack
2020-09-11 07:42:38 +08:00
parent 818ffb2ce6
commit 40276babfb
5 changed files with 258 additions and 24 deletions

View File

@@ -12,6 +12,7 @@ namespace catcher\command\install;
use catchAdmin\permissions\model\Permissions;
use catcher\CatchAdmin;
use catcher\library\InstallLocalModule;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
@@ -33,8 +34,7 @@ class EnableModuleCommand extends Command
if (empty(CatchAdmin::getModuleInfo(CatchAdmin::directory() .$module))) {
$output->error("module [$module] not exist");
} else {
CatchAdmin::enableModule($module);
app(Permissions::class)->restore(['module' => trim($module)]);
(new InstallLocalModule($module))->enableModule();
$output->info("module [$module] enabled");
}
}