update:优化模块信息获取

This commit is contained in:
JaguarJack
2021-02-08 11:12:36 +08:00
parent 84c85c3d12
commit 61ecd0629f
3 changed files with 56 additions and 124 deletions

View File

@@ -22,7 +22,7 @@ class Module extends CatchController
$modules = [];
foreach(CatchAdmin::getModulesDirectory() as $d) {
$modules[] = json_decode(file_get_contents($d . 'module.json'), true);
$modules[] = CatchAdmin::getModuleInfo($d);
}
$hasModules = array_unique(Permissions::whereIn('id', request()->user()->getPermissionsBy())->column('module'));