getEnabledPlugins(); $assets = []; foreach ($plugins as $plugin) { if (method_exists($plugin->app(), 'getAssetConfig')) { foreach ($plugin->app()->getAssetConfig() as $key => $item) { foreach ($item as $id => $func) { array_set($assets[$key], $id, $func); } } } } $this->data = $assets; } public function getData($key = '') { if ($key) { return $this->data[$key] ?? []; } return $this->data; } }