Esempio n. 1
0
 /**
  * Perform an update query.
  *
  * @param  array  $query
  * @param  array  $options
  * @return int
  */
 protected function performUpdate($query, array $options = [])
 {
     // Update multiple items by default.
     if (!array_key_exists('multiple', $options)) {
         $options['multiple'] = true;
     }
     $wheres = $this->compileWheres();
     $result = $this->collection->updateMany($wheres, $query, $options);
     //        if (1 == (int) $result['ok'])
     //        {
     //            return $result['n'];
     //        }
     return $result->getModifiedCount();
     return 0;
 }