/** * Update an array of values in the database table. * * @param array $values * @return int */ public function update($values) { // For update statements, we need to merge the bindings such that // the update values occur before the where bindings in the array // since the set statements will precede any of the where clauses // in the SQL syntax that is generated. $bindings = array_merge(array_values($values), $this->bindings); $sql = $this->grammar->update($this, $values); return $this->connection->update($sql, $bindings); }