[Laravel tips] How to redirect users to a specific URL/route when the #validation fails
▻https://hackernoon.com/laravel-tips-how-to-redirect-users-to-a-specific-url-route-when-the-vali
If you are using Form Request to validate your forms before you persist them in the database, when the validation fails, the user is usually redirected back to the same page that initiated the request.For instance if you are on /new-article page, after you submit the article you are creating, the user will be redirected back automatically to this very same URL if the data she entered failed to pass the validation. This is the desired behavior in majority of the cases.Lately, I was working on a form where I needed to redirect the user back to another route.I was working on an application where we have different settings the user could update (from the settings page), and since it wasn’t desirable to send all the data in this page at once, validate it and then update the user settings, I (...)