Пример #1
0
 /**
  * Adjust the value of a column up or down by a given amount.
  *
  * @param  string  $column
  * @param  int     $amount
  * @param  string  $operator
  * @return int
  */
 protected function adjust($column, $amount, $operator)
 {
     // To make the adjustment to the column, we'll wrap the expression
     // in an Expression instance, which forces the adjustment to be
     // injected into the query as a string instead of bound.
     $value = Database::raw($this->grammar->wrap($column) . $operator . $amount);
     return $this->update(array($column => $value));
 }