$target */ public function __construct(public string $target) { } /** * @param array> $value * @return Collection */ public function cast(DataProperty $property, mixed $value, array $properties, CreationContext $context): mixed { return collect($value)->map(fn ($item) => $this->target::from($item)); } }