make:dto now opens the file after is generatedextended-php dependency replaced with extended-laravel (required to use OpensGeneratedFiles trait on the make:dto command)laravel-helpers with extended-phpdump and dd methodstoArray method not returning everything when DTOs where used on the request and later on reused. Caveat: Only one DTO per request until v4 refactorfromArrayfilled method not working properlyresolveRouteBindingQuery)resolveRouteBindingQuery methodgetRouteKeyName) only when BindModel PHP attribute doesn't have the using argumentBackedEnum typed properties with union types falling back to original valueBindModelUsing instead of new BindModel attributeModel classRelation::morphMappublic Film|Post $taggable, public string $taggableTypeOpenSoutheners\LaravelDto\Attributes\BindModel attribute grouping all the model binding options.OpenSoutheners\LaravelDto\Attributes\BindModel attribute in morph properties, which can be also used to customise the type key name. For e.g. from the same example from above:#[BindModel(
using: [Post::class => 'slug'],
with: [Post::class => 'tags', Film::class => ['tags', 'posts']],
morphTypeKey: 'tagType'
)]
public Film|Post $taggable,
public string $tagType
#[BindModelUsing('attribute')] to #[BindModel(using: 'attribute')] in your code (take in mind it must not be repeated under the same property)#[BindModelWith(['relation1', 'relation2'])] to #[BindModel(with: ['relation1', 'relation2'])] in your code (take in mind it must not be repeated under the same property)OpenSoutheners\LaravelDto\Attributes\WithDefaultValue attribute to set default value#[WithDefaultValue(Authenticatable::class)] will set as default value the authenticated user (Auth::user())\stdClass properties get properly serialised as multidimensional arrays.d.ts generation command with --declarations optionvendor:publish --provider="OpenSoutheners\\LaravelDto\\ServiceProvider" or vendor:publish --tag="config" commandsdto:typescript command for generating TypeScript types based on your application's DTOsBindModelUsing attribute or custom model's getRouteKeyName method now works querying all modelsmake:dto command now does not generate a ValidatedDataTransferObject with request static method on itmake:dto command when sent without a value failsHow can I help you explore Laravel packages today?