Skip to content

Commit 8068f3a

Browse files
feat(laravel): Adding support for array and object casts
1 parent 7ff9790 commit 8068f3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Laravel/Eloquent/Metadata/Factory/Property/EloquentPropertyMetadataFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public function create(string $resourceClass, string $property, array $options =
8181
'datetime', 'date', 'timestamp' => new Type(Type::BUILTIN_TYPE_OBJECT, $p['nullable'], \DateTime::class),
8282
'immutable_datetime', 'immutable_date' => new Type(Type::BUILTIN_TYPE_OBJECT, $p['nullable'], \DateTimeImmutable::class),
8383
'collection', 'encrypted:collection' => new Type(Type::BUILTIN_TYPE_ITERABLE, $p['nullable'], Collection::class, true),
84-
'encrypted:array' => new Type(Type::BUILTIN_TYPE_ARRAY, $p['nullable']),
85-
'encrypted:object' => new Type(Type::BUILTIN_TYPE_OBJECT, $p['nullable']),
84+
'array', 'encrypted:array' => new Type(Type::BUILTIN_TYPE_ARRAY, $p['nullable']),
85+
'object', 'encrypted:object' => new Type(Type::BUILTIN_TYPE_OBJECT, $p['nullable']),
8686
default => new Type(\in_array($builtinType, Type::$builtinTypes, true) ? $builtinType : Type::BUILTIN_TYPE_STRING, $p['nullable'] ?? true),
8787
};
8888

0 commit comments

Comments
 (0)