Skip to content

Kirby 5.0.4

Cookie::remove()

Remove a cookie

Cookie::remove(string $key): bool

Parameters

Name Type Default Description
$keyrequired string no default value The name of the cookie

Return type

bool

true: the cookie has been removed, false: the cookie could not be removed

Parent class

Kirby\Http\Cookie

Examples

// mycookie is now gone
Cookie::remove('mycookie');