Reference

$session->get()

Returns one or all session values by key

$session->get(string|null $key = null, mixed $default = null): mixed

Parameters

Name Type Default Description
$key string|null null

The key to get or null for the entire data array

$default mixed null

Optional default value to return if the key is not defined

Return type

mixed

Source code

kirby/src/Session/SessionData.php#L175