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;
@@ -34,10 +35,7 @@ class DisableModuleCommand extends Command
if (empty(CatchAdmin::getModuleInfo(CatchAdmin::directory() .$module))) {
$output->error("module [$module] not exist");
} else {
CatchAdmin::disableModule($module);
Permissions::destroy(function ($query) use ($module){
$query->where('module', trim($module));
});
(new InstallLocalModule($module))->disableModule();
$output->info("module [$module] disabled");
}
}