@@ -16,10 +17,6 @@ To store items in the session call the put method on the Session class:
...
@@ -16,10 +17,6 @@ To store items in the session call the put method on the Session class:
The first parameter is the **key** to the session item. You will use this key to retrieve the item from the session. The second parameter is the **value** of the item.
The first parameter is the **key** to the session item. You will use this key to retrieve the item from the session. The second parameter is the **value** of the item.
The **flash** method stores an item in the session that will expire after the next request. It's useful for storing temporary data like status or error messages:
Session::flash('status', 'Welcome Back!');
<aname="get"></a>
<aname="get"></a>
## Retrieving Items
## Retrieving Items
...
@@ -53,6 +50,27 @@ You can even remove all of the items from the session using the **flush** method
...
@@ -53,6 +50,27 @@ You can even remove all of the items from the session using the **flush** method
Session::flush();
Session::flush();
<aname="flash"></a>
## Flashing Items
The **flash** method stores an item in the session that will expire after the next request. It's useful for storing temporary data like status or error messages:
Session::flash('status', 'Welcome Back!');
Flash items that are expiring in subsequent requests can be retained for another request by using one of the **reflash** or **keep** methods: