mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 23:52:31 -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);
|
$model_name = ucfirst($model);
|
||||||
|
|
||||||
if (file_exists(app_path() . '/Models/' . $model_name . '.php')) {
|
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) {
|
if ($type != null && $type != $model_class::$dashboard_type) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue