FIX: fix registering service providers in templates
This commit is contained in:
@@ -16,7 +16,7 @@ class ModuleManager extends ServiceProvider
|
||||
{
|
||||
// this service provider needs published config - config is merged right after this service provider
|
||||
try {
|
||||
$modules = app(ModuleRepository::class)->getOnlyModules();
|
||||
$modules = app(ModuleRepository::class)->all();
|
||||
} catch (QueryException $e) {
|
||||
return;
|
||||
}
|
||||
@@ -32,7 +32,13 @@ class ModuleManager extends ServiceProvider
|
||||
// include files (if any)
|
||||
if (isset($module->module_settings['files']) && !empty($module->module_settings['files'])) {
|
||||
foreach ($module->module_settings['files'] as $file) {
|
||||
include config('modules.paths.modules') . '/' . $module->static_name . '/' . $file;
|
||||
$path = config('modules.paths.modules') . '/' . $module->static_name . '/' . $file;
|
||||
|
||||
if (!file_exists($path)) {
|
||||
$path = base_path($file);
|
||||
}
|
||||
|
||||
@include_once $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user