$session->increment()
Increments one or multiple session values by a specified amount
$session->increment(array|string $key, int $by = 1, int|null $max = null): void
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $keyrequired | arrayorstring |
no default value | The key to increment or an array with multiple keys |
| $by | int |
1
|
Amount to increment by |
| $max | intornull |
null
|
Maximum amount (value is not incremented further) |