diff --git a/src/Casts/EnumCast.php b/src/Casts/EnumCast.php index 1895d0c5..24b24e3e 100644 --- a/src/Casts/EnumCast.php +++ b/src/Casts/EnumCast.php @@ -48,7 +48,7 @@ protected function castValue( /** @var class-string<\BackedEnum> $type */ try { - return $type::from($value); + return $type::from($value instanceof \BackedEnum ? $value->value : $value); } catch (Throwable $e) { throw CannotCastEnum::create($type, $value, $property); }