Reference

$session->decrement()

Decrements one or multiple session values by a specified amount

$session->decrement(string|array $key, int $by = 1, int $min = null): void

Parameters

Name Type Default Description
$key string|array

The key to decrement or an array with multiple keys

$by int 1

Decrement by which amount?

$min int null

Minimum amount (value is not decremented further)

Return type

void

Source code

kirby/src/Session/SessionData.php#L122