Upgrading
In your application was using the previous version 3 of this package.
POPO
Remove all
extends DataTransferObject
Remove all
implements ValidatedDataTransferObject
and move the return content ofpublic static function request()
to a class attribute on top of this DTO class name (before) like the following#[Validate(MyFormRequest::class)]
, then addimplements RouteTransferableObject
Search for any
::fromArray
or::fromRequest()
calls to these DTO classes then replace withmap([])->to(MyDtoClass::class)
ormap($request)->to(MyDtoClass::class)
Logic separation on properties attributes
Change all
#[WithDefaultValue(Authenticatable::class)]
with#[Inject(Authenticatable::class)]
Change all
#[BindModel]
with#[FromRouteBinding]
(and in case of having some content on theBindModel
add below#[ModelWith(['relation1', 'relation2'])]
)
TypeScript types generation
TypeScript generation command now has been removed, instead you can engineer something of your own using Generating TypeScript code
Last updated
Was this helpful?