various refactorings.
This commit is contained in:
@@ -182,6 +182,16 @@ class Session {
|
||||
static::$exists = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CSRF token that is stored in the session data.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function token()
|
||||
{
|
||||
return static::get('csrf_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the session payload in storage.
|
||||
*
|
||||
@@ -196,9 +206,6 @@ class Session {
|
||||
|
||||
$config = Config::$items['session'];
|
||||
|
||||
// To keep the session persistence code clean, session drivers are
|
||||
// responsible for the storage of the session array to the various
|
||||
// available persistent storage mechanisms.
|
||||
$driver->save(static::$session, $config, static::$exists);
|
||||
|
||||
static::cookie();
|
||||
|
||||
Reference in New Issue
Block a user