Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stelin committed May 26, 2019
1 parent d41211a commit 787d199
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,7 @@ protected function incrementOrDecrement(string $column, $amount, array $extra, s
protected function incrementOrDecrementAttributeValue(string $column, $amount, $extra, $method)
{
$columnValue = $method === 'increment' ? $amount : $amount * -1;
if (!property_exists($this, $column)) {
$this->setAttribute($column, $this->getAttributeValue($column) + $columnValue);
} else {
$this->{$column} = $this->{$column} + $columnValue;
}
$this->setAttribute($column, $this->getAttributeValue($column) + $columnValue);

$this->fill($extra);

Expand Down

0 comments on commit 787d199

Please sign in to comment.