Skip to content

Commit

Permalink
Adding some explanation to the RedirectResponse->with() method
Browse files Browse the repository at this point in the history
I've seen various people get confused by this so I thought I'd expound on the concept a bit.
  • Loading branch information
janhartigan committed Jul 23, 2013
1 parent 8142fbf commit 9754bd6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ A `Response` instance inherits from the `Symfony\Component\HttpFoundation\Respon

return Redirect::to('user/login')->with('message', 'Login Failed');

Since the `with()` method flashes the data to the session, you can retrieve it using `Session::get('message')`.

**Returning A Redirect To A Named Route**

return Redirect::route('login');
Expand Down

0 comments on commit 9754bd6

Please sign in to comment.