diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8c9f92b8dc..a2896e79ca 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -143,7 +143,7 @@ class Handler extends ExceptionHandler ->withInput(); } - // This gets the MVC model name from the exception and formats in a way that's less fugly + // This gets the MVC model name from the exception and formats in a way that's less fugly $model_name = trim(strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))))); $route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index'; @@ -160,9 +160,7 @@ class Handler extends ExceptionHandler $route = 'maintenances.index'; } elseif ($route === 'licenseseats.index') { $route = 'licenses.index'; - } elseif ($route === 'customfields.index') { - $route = 'fields.index'; - } elseif ($route === 'customfieldsets.index') { + } elseif (($route === 'customfieldsets.index') || ($route === 'customfields.index')) { $route = 'fields.index'; }