public function __construct(SessionHandlerInterface
$driver, SessionConfig
$config) { $this->driver =
$driver;
$this->config =
$config;
$cookie =
config(CookieConfig::
class);
$this->cookie =
(new Cookie($this->config->cookieName, '',
[ 'expires' =>
$this->config->expiration === 0 ? 0 : Time::
now()->
getTimestamp() +
$this->config->expiration,
'path' =>
$cookie->path,
'domain' =>
$cookie->domain,
'secure' =>
$cookie->secure,
'httponly' => true, // for security
'samesite' =>
$cookie->samesite ?? Cookie::SAMESITE_LAX,
'raw' =>
$cookie->raw ?? false,
]))->
withPrefix(''
); // Cookie prefix should be ignored.
helper('array'
);
}