-
Hello, I have the following doubt, as at least I have not seen that it can be done or I am doing something wrong. Having the following route Route::delete("users/{user}", Controller::class), is there any way to validate and put in the DTO the {user} that I get by the url? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Create a magic creation method, where you take the url from the request and inject the data object within the controller. |
Beta Was this translation helpful? Give feedback.
-
Well, I don't know if it's because of the latest v3 update, but I checked again, and with request()->route('user'), it returns the model without problems inside rules(). |
Beta Was this translation helpful? Give feedback.
Well, I don't know if it's because of the latest v3 update, but I checked again, and with request()->route('user'), it returns the model without problems inside rules().