插件机制完善

This commit is contained in:
2020-04-04 14:20:01 +08:00
parent 2f4386f196
commit ba37debc0e
13 changed files with 174 additions and 117 deletions

View File

@@ -15,6 +15,7 @@ use think\facade\Cache;
use think\Validate;
use app\model\Config;
use think\facade\Route;
use app\model\Hooks;
class Base {
@@ -71,7 +72,11 @@ class Base {
$config = Config::getConfigList($this->request);
Cache::set('system_config_data', $config);
}
config($config, 'config');
$hooks = Hooks::where('status', 1)->column('addons', 'name');
foreach($hooks as $key => $value){
$hooks[$key] = $value ? explode(",", $value) : [];
}
Cache::set('sentcms_hooks', $hooks);
View::assign('config', $config);
// 控制器初始化
$this->initialize();