Defaults to 1 if no value is specified. Throws an exception if the specified field is
non-numeric.
public increment ( string $field, integer | string $value = 1 ) : integer | ||
$field | string | The name of the field to be incremented. |
$value | integer | string | The value to increment the field by. Defaults to `1` if this parameter is not specified. |
return | integer | Returns the current value of `$field`, based on the value retrieved from the data source when the entity was loaded, plus any increments applied. Note that it may not reflect the most current value in the persistent backend data source. |