Skip to content

Kirby 3.9.8

Cookie::set()

Set a new cookie

Cookie::set(string $key, string $value, array $options = [ ]): bool

Parameters

Name Type Default Description
$key * string The name of the cookie
$value * string The cookie content
$options array [ ] Array of options:
lifetime, path, domain, secure, httpOnly, sameSite

Return type

bool

Parent class

Kirby\Http\Cookie