Looking at this example in the docs of laravel-data you can see that the data class is responsible for validating the request. The result of $postData->toArray() is used as input for the actual factory/model that creates the post.
I have not used or tested this package yet for validating requests. I would really like to try this out and add the necessary validation attributes to the data classes in this package. https://spatie.be/docs/laravel-data/v4/validation/using-validation-attributes.
Looking at this example in the docs of laravel-data you can see that the data class is responsible for validating the request. The result of
$postData->toArray()is used as input for the actual factory/model that creates the post.I have not used or tested this package yet for validating requests. I would really like to try this out and add the necessary validation attributes to the data classes in this package. https://spatie.be/docs/laravel-data/v4/validation/using-validation-attributes.