Skip to content

Commit bc17acb

Browse files
committed
hotfix: revert polymorphic type cast logic
1 parent 19f033e commit bc17acb

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎src/Casts/PolymorphicType.php‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ class PolymorphicType implements CastsAttributes
2121
*/
2222
public function get($model, $key, $value, $attributes)
2323
{
24-
// If value is null or empty, return as-is
25-
if (empty($value)) {
26-
return $value;
27-
}
28-
29-
// Convert full class name back to short type
30-
return Utils::getShortTypeFromClassName($value);
24+
return $value;
3125
}
3226

3327
/**
@@ -41,7 +35,6 @@ public function set($model, $key, $value, $attributes)
4135
{
4236
// default $className is null
4337
$className = null;
44-
4538
if ($value) {
4639
$className = Utils::getMutationType($value);
4740
}

0 commit comments

Comments
 (0)