diff --git a/laravel/documentation/session/usage.md b/laravel/documentation/session/usage.md index 5f9aad56..b390b75e 100644 --- a/laravel/documentation/session/usage.md +++ b/laravel/documentation/session/usage.md @@ -5,6 +5,7 @@ ## Contents - [Storing Items](#put) - [Retrieving Items](#get) - [Removing Items](#forget) +- [Flashing Items](#flash) - [Regeneration](#regeneration) @@ -16,10 +17,6 @@ ## Storing Items 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!'); - ## Retrieving Items @@ -53,6 +50,28 @@ ## Removing Items Session::flush(); + +## 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 expring in subsequent requests can be retained for another request by using one of the following methods: + +Retain all items for another request: + + Session::reflash(); + +Retain an individual item for another request: + + Session::keep('status'); + +Retain several items for another request: + + Session::keep(array('status', 'other_item')); + + ## Regeneration