7.3 Flash Data
Flash data is a useful method of storing data in the session for use in the next request. It can be
a useful way to repopulate forms.
To flash all of the current request data to the session, for it to be accessible in the next request,
simply use the flash() method.
1 <?php
2
3 Input::flash(7.3 Flash Data
Flash data is a useful method of storing data in the session for use in the next request. It can be
a useful way to repopulate forms.
To flash all of the current request data to the session, for it to be accessible in the next request,
simply use the flash() method.
1 <?php
2
3 Input::flash();
1 <?php
2
3 return Redirect::to('party')->with_input();
The with_input() method will flash all of our request data for us, it also accepts the same only
and except methods as our flash() method.
1 <?php
2
3 return Redirect::to('party')->with_input('only', array('betty', 'simon'));
4 return Redirect::to('party')->with_input('except', array('uncle_bob'));
Now that you have access to form data, your applications will become much more interactive!
);