修改启用/禁用模块删除对应的菜单

This commit is contained in:
JaguarJack
2020-07-01 15:47:06 +08:00
parent 51672734a6
commit 24e1506743
2 changed files with 6 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace catcher\command\install;
use catchAdmin\permissions\model\Permissions;
use catcher\CatchAdmin;
use think\console\Command;
use think\console\Input;
@@ -33,6 +34,7 @@ class EnableModuleCommand extends Command
$output->error("module [$module] not exist");
} else {
CatchAdmin::enableModule($module);
app(Permissions::class)->restore(['module' => trim($module)]);
$output->info("module [$module] enabled");
}
}