updated category structure of reports

This commit is contained in:
denisdulici
2020-01-04 13:42:58 +03:00
parent bc46b1f8f6
commit dca5a64122
11 changed files with 107 additions and 145 deletions

View File

@@ -38,15 +38,13 @@ class Widgets
continue;
}
$name = (new $class())->getDefaultName();
$classes[$class] = $name;
$classes[$class] = (new $class())->getDefaultName();
}
return $classes;
}
public static function getInstance($model)
public static function getClassInstance($model)
{
if (is_string($model)) {
$model = Widget::where('class', $model)->first();
@@ -63,7 +61,7 @@ class Widgets
public static function show($model, ...$arguments)
{
if (!$class = static::getInstance($model)) {
if (!$class = static::getClassInstance($model)) {
return '';
}