Commit ca2c9882 authored by Taylor Otwell's avatar Taylor Otwell

added cookie option to session configuration.

parent 8df52df8
......@@ -69,6 +69,17 @@ return array(
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| The name that should be given to the session cookie.
|
*/
'cookie' => 'laravel_session',
/*
|--------------------------------------------------------------------------
| Session Cookie Path
......
......@@ -31,7 +31,7 @@ if (Config::$items['session']['driver'] !== '')
$driver = IoC::container()->core('session.'.Config::$items['session']['driver']);
if ( ! is_null($id = Cookie::get(Session\Payload::cookie)))
if ( ! is_null($id = Cookie::get(Config::$items['session']['cookie'])))
{
$payload = new Session\Payload($driver->load($id));
}
......
......@@ -22,13 +22,6 @@ class Payload {
*/
protected $exists = true;
/**
* The name of the session cookie used to store the session ID.
*
* @var string
*/
const cookie = 'laravel_session';
/**
* Create a new session payload instance.
*
......@@ -256,7 +249,7 @@ class Payload {
$minutes = ( ! $config['expire_on_close']) ? $config['lifetime'] : 0;
Cookie::put(Payload::cookie, $this->id, $minutes, $config['path'], $config['domain'], $config['secure']);
Cookie::put($cookie, $this->id, $minutes, $config['path'], $config['domain'], $config['secure']);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment