Combine fields and fieldset exception

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-08-17 14:06:49 +01:00
parent 91f3556375
commit a9da3aca81

View File

@@ -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';
}