From 837f6176272e8599ad689b2c10cbe610d5ecc0a8 Mon Sep 17 00:00:00 2001 From: TommyC81 Date: Fri, 29 Jun 2012 21:42:06 +0300 Subject: [PATCH 1/4] Re-organized and added some more help on the reflash() and keep() functions. --- laravel/documentation/session/usage.md | 27 ++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) 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 @@ - [Storing Items](#put) - [Retrieving Items](#get) - [Removing Items](#forget) +- [Flashing Items](#flash) - [Regeneration](#regeneration) @@ -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 **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 @@ You can even remove all of the items from the session using the **flush** method 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 From 26623c79ed48df79d2315330899e0a20abebd5e3 Mon Sep 17 00:00:00 2001 From: TommyC81 Date: Fri, 29 Jun 2012 21:45:31 +0300 Subject: [PATCH 2/4] Removed empty row. --- laravel/documentation/session/usage.md | 1 - 1 file changed, 1 deletion(-) diff --git a/laravel/documentation/session/usage.md b/laravel/documentation/session/usage.md index b390b75e..d0f8ec31 100644 --- a/laravel/documentation/session/usage.md +++ b/laravel/documentation/session/usage.md @@ -71,7 +71,6 @@ Retain several items for another request: Session::keep(array('status', 'other_item')); - ## Regeneration From 2159596a83ec8ccdf0b8fb220d153b05588d3524 Mon Sep 17 00:00:00 2001 From: TommyC81 Date: Fri, 29 Jun 2012 21:49:54 +0300 Subject: [PATCH 3/4] Bold characters for reflash and keep. --- laravel/documentation/session/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/documentation/session/usage.md b/laravel/documentation/session/usage.md index d0f8ec31..9e6984ca 100644 --- a/laravel/documentation/session/usage.md +++ b/laravel/documentation/session/usage.md @@ -57,7 +57,7 @@ The **flash** method stores an item in the session that will expire after the ne 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: +Flash items that are expring in subsequent requests can be retained for another request by using one of the **reflash** or **keep** methods: Retain all items for another request: From 110078d2af55053f5c24e0fbb2b4115d1687cc36 Mon Sep 17 00:00:00 2001 From: TommyC81 Date: Fri, 29 Jun 2012 21:55:38 +0300 Subject: [PATCH 4/4] Fixed typo --- laravel/documentation/session/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/documentation/session/usage.md b/laravel/documentation/session/usage.md index 9e6984ca..1b5c9d5c 100644 --- a/laravel/documentation/session/usage.md +++ b/laravel/documentation/session/usage.md @@ -57,7 +57,7 @@ The **flash** method stores an item in the session that will expire after the ne Session::flash('status', 'Welcome Back!'); -Flash items that are expring in subsequent requests can be retained for another request by using one of the **reflash** or **keep** methods: +Flash items that are expiring in subsequent requests can be retained for another request by using one of the **reflash** or **keep** methods: Retain all items for another request: