mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-12-22 09:40:23 -05:00
Use the model_name to both check for a class and retrieve it
This commit is contained in:
parent
b54ad4ba28
commit
54843cbdf2
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ class Dashboard
|
|||
$model_name = ucfirst($model);
|
||||
|
||||
if (file_exists(app_path() . '/Models/' . $model_name . '.php')) {
|
||||
$model_class = 'App\\Models\\' . ucfirst($model);
|
||||
$model_class = 'App\\Models\\' . $model_name;
|
||||
|
||||
if ($type != null && $type != $model_class::$dashboard_type) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue