Redirects
Redirect responses are instances of the IlluminateHttpRedirectResponse class, and contain the proper headers needed to redirect the user to another URL. There are several ways to generate a RedirectResponse instance. The simplest method is to use the global redirect helper method:
Sometimes you may wish to redirect the user to their previous location, for example, after a form submission that is invalid. You may do so by using the global back helper function: