In my last article, I talked about how you can minimize your controller by putting the code out from it and put it somewhere else. Rest of the code we put in a FormRequest class.

As the name suggests, this method is used to merge your extra data with your actual request. This method can be called in your controller or anywhere when you want to merge something in the request.

Here in this method you can put/remove any key you want as like the prepareForValidation() method.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Community Partners