Skip to content

Dynamic casting based on passed data #102

Discussion options

You must be logged in to vote

You could skip the cast and use a magical creation method(https://spatie.be/docs/laravel-data/v1/as-a-data-transfer-object/creating-a-data-object#magical-creation), you have access to all the values being passed over there. I think that's the only solution, for now.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@davidkvasnovsky
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by davidkvasnovsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants