Пример #1
0
 /**
  * Remove one or more values from an array.
  *
  * @param mixed $column
  * @param mixed $value
  *
  * @return bool
  */
 public function pull($column, $value = null)
 {
     $value = is_array($value) ? $value : [$value];
     $this->compileWheres();
     $result = $this->query->update([$column => r\row($column)->difference($value)])->run();
     return 0 == (int) $result['errors'];
 }
Пример #2
0
 /**
  * Remove one or more values from an array.
  *
  * @param  mixed   $column
  * @param  mixed   $value
  * @return bool
  */
 public function pull($column, $value = null)
 {
     $this->compileWheres();
     $result = $this->query->update([$column => r\row($column)->difference([$value])])->run()->toNative();
     return 0 == (int) $result['errors'];
 }