FIX: check if method is callable before calling it

This commit is contained in:
Michal Kváček
2016-10-03 03:09:04 +02:00
parent da1c8652e6
commit de02944d0d
@@ -51,7 +51,9 @@ class TemplateServiceProvider extends ServiceProvider
// register path with current template name
$registrator->setNamespace($namespace);
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']);
}