Changelog
Here's a quick overview of the new features in the latest major versions of the package.
3.4.0
Added the
dto:stubs
command to publish the DTO stubs to be customized.Fixed issue with file validation.
3.3.0
Added the
after
method toValidatedDTO
to be able to use the After Hook when validating data
3.2.0
Added the
Cast
attribute to define custom casting for DTO properties
3.1.0
Added the
Rules
attribute to define custom validation rules for DTO propertiesAdded the
DefaultValue
attribute to define default values for DTO propertiesAdded the
Map
attribute to define custom mapping for DTO propertiesAdded the
EmptyCasts
trait to be used by DTOs that don't have any castsAdded the
EmptyRules
trait to be used by DTOs that don't have any validation rules or that are using theRules
attribute for validationAdded the
EmptyDefaults
trait to be used by DTOs that don't have any default values or that are using theDefaultValue
attribute for default values
3.0.0
Use DTO as it was a Form Request
Ability to customize the path/namespace of the generated DTOs
DTO classes generated with the make command are more slim
Ability to cast array items when using the
ArrayCast
New
EnumCast
for casting values to Enums. Work withUnitEnum
andBackedEnum
mapBeforeValidation()
was renamed tomapData()
mapBeforeExport()
was renamed tomapToTransform()
->toJson()
method now returns a JSON string without any formatting. Use->toPrettyJson()
instead
Last updated