Reference

Guide

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

Return type

bool

Source code

kirby/src/Http/Cookie.php#L43