LMongo\Eloquent\Model::incrementOrDecrement PHP Method

incrementOrDecrement() protected method

Run the increment or decrement method on the model.
protected incrementOrDecrement ( string $column, integer $amount, string $method ) : integer
$column string
$amount integer
$method string
return integer
    protected function incrementOrDecrement($column, $amount, $method)
    {
        $query = $this->newQuery();
        if (!$this->exists) {
            return $query->{$method}($column, $amount);
        }
        return $query->where($this->getKeyName(), $this->getKey())->{$method}($column, $amount);
    }
Model