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