Mecha CMS

Helper functions.

cookie

Short function for Cookie::set() and Cookie::get().

2.2.0Cookie

cookie(...$lot);

Example:

// Set `foo` cookie
cookie('foo', 1, '1 day');

// Get cookies
$cookies = cookie();
// Get `foo` cookie
$cookie = cookie('foo');