refactoring redirect class.

This commit is contained in:
Taylor Otwell
2011-07-07 23:55:27 -05:00
parent ea6b58b28c
commit a86d4477ca

View File

@@ -60,11 +60,13 @@ class Redirect {
*/ */
public function with($key, $value) public function with($key, $value)
{ {
if (Config::get('session.driver') != '') if (Config::get('session.driver') == '')
{ {
Session::flash($key, $value); throw new \Exception("Attempting to flash data to the session, but no session driver has been specified.");
} }
Session::flash($key, $value);
return $this; return $this;
} }