refactoring various classes.

This commit is contained in:
Taylor Otwell
2011-10-15 14:39:52 -05:00
parent 2b93963f34
commit 76a5bc483a
6 changed files with 13 additions and 25 deletions

View File

@@ -29,12 +29,11 @@ class Cookie implements Transporter {
*/
public function put($id, $config)
{
// Session cookies may be set to expire on close, which means we will
// need to pass "0" into the cookie manager. This will cause the
// cookie to not be deleted until the user closes their browser.
$minutes = ( ! $config['expire_on_close']) ? $config['lifetime'] : 0;
extract($config, EXTR_SKIP);
\Laravel\Cookie::put(Cookie::key, $id, $minutes, $config['path'], $config['domain'], $config['secure']);
$minutes = ( ! $expire_on_close) ? $lifetime : 0;
\Laravel\Cookie::put(Cookie::key, $id, $minutes, $path, $domain, $secure);
}
}