Mapping DTO properties
Mapping data on instantiation
protected function mapData(): array
{
return [
'full_name' => 'name',
];
}use WendellAdriel\ValidatedDTO\Attributes\Map;
class UserDTO extends ValidatedDTO
{
#[Map(data: 'full_name')]
public string $name;
public string $email;
public bool $active;
}Mapping nested data to flat data
The Receive attribute
Receive attributeMapping data before transforming
Mapping nested data to flat data
The SkipOnTransform attribute
SkipOnTransform attributeThe Provide attribute
Provide attributeLast updated