diff --git a/src/Modal.php b/src/Modal.php index 1c1cb13..1c6d25b 100644 --- a/src/Modal.php +++ b/src/Modal.php @@ -84,6 +84,14 @@ protected function resolveParameter($attributes, $parameterName, $parameterClass return $parameterValue; } + if(enum_exists($parameterClassName)){ + $enum = $parameterClassName::tryFrom($parameterValue); + + if($enum !== null){ + return $enum; + } + } + $instance = app()->make($parameterClassName); if (! $model = $instance->resolveRouteBinding($parameterValue)) {