lorisleiva / laravel-actions

⚡️ Laravel components that take care of one specific task
https://laravelactions.com
MIT License
2.52k stars 124 forks source link

Use FormRequest methods in asController method #184

Closed florentsorel closed 1 month ago

florentsorel commented 2 years ago

Hi,

I would like to use some method from FormRequest object like safe, validated but the asController method need a Request object and the method safe doesn't exists inside this object and I prefer to avoid the use of except method.

It's possible to handle this?

tommica commented 2 years ago

Isn't this solved by using Lorisleiva\Actions\ActionRequest?

public function asController(ActionRequest $request) {...}

https://laravelactions.com/2.x/add-validation-to-controllers.html#add-validation-to-your-controllers

Wulfheart commented 1 month ago

Closing due to inactivity. If you feel your issue is still relevant please open a new one with a link to a repository containing a minimal reproducible example.