FIX: check if method is callable before calling it
This commit is contained in:
@@ -51,7 +51,9 @@ class TemplateServiceProvider extends ServiceProvider
|
||||
// register path with current template name
|
||||
|
||||
$registrator->setNamespace($namespace);
|
||||
$registrator->setModuleId(call_user_func([config($module . '.handler'), 'getModuleId']));
|
||||
if (is_callable([config($module . '.handler'), 'getModuleId'])) {
|
||||
$registrator->setModuleId(call_user_func([config($module . '.handler'), 'getModuleId']));
|
||||
}
|
||||
$registrator->register('resources/views/modules/' . $module, 'visitor', $template['templateName']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user