Example #1
0
 /**
  * {@inheritdoc}
  */
 public function increment($column, $increment = 1)
 {
     if ($this->model->exists()) {
         $this->model->{$column} += $increment;
         $this->where($this->model->getPrimaryKey(), '=', $this->model->getPrimaryKeyValue());
     }
     $updated = parent::increment($column, $increment);
     if ($this->model->exists()) {
         $this->model->synchronize();
     }
     return $updated;
 }