DtoAware
- Full name:
\Codefy\Framework\Dto\Trait\DtoAware
Methods
toDto
Convert validated data to DTO.
This method creates a DTO instance using only validated data from Input Validator or Form Request.
Return Value:
The corresponding DTO instance.
Throws:
If DTO class is not found or doesn't have fromData method. - RuntimeException
getDtoClass
Get the DTO class name for this Input Validator or Form Request.
Return Value:
The fully qualified DTO class name
toDtoArray
Convert DTO object data to array.