src/Builder.php
public function update(array $values)
    {
        $updated = 0;

        $modelKey = $this->getModel()->getKey();
        $modelKeyName = $this->model->getKeyName();

        $values = $this->addUpdatedAtColumn($values);
        list($values, $i18nValues) = $this->filterValues($values);

        $ids = $modelKey ? [$modelKey] : $this->pluck($modelKeyName)->all();

        if($values) {
            $updated += $this->updateBase($values, $ids);
        }

        if($i18nValues) {
            $updated += $this->updateI18n($i18nValues, $ids);
        }

        return $updated;
    }
public function update(array $values)
    {
        $updated = 0;

        $modelKey = $this->getModel()->getKey();
        $modelKeyName = $this->model->getKeyName();

        $values = $this->addUpdatedAtColumn($values);
        list($values, $i18nValues) = $this->filterValues($values);

        $ids = $modelKey ? [$modelKey] : $this->pluck($modelKeyName)->all();

        if($values) {
            $updated += $this->updateBase($values, $ids);
        }

        if($i18nValues) {
            $updated += $this->updateI18n($i18nValues, $ids);
        }

        return $updated;
    }
public function update ( array $ values ) { $ updated = 0 ; $ modelKey = $ this -> getModel ( ) -> getKey ( ) ; $ modelKeyName = $ this -> model -> getKeyName ( ) ; $ values = $ this -> addUpdatedAtColumn ( $ values ) ; list ( $ values , $ i18nValues ) = $ this -> filterValues ( $ values ) ; $ ids = $ modelKey ? [ $ modelKey ] : $ this -> pluck ( $ modelKeyName ) -> all ( ) ; if ( $ values ) { $ updated += $ this -> updateBase ( $ values , $ ids ) ; } if ( $ i18nValues ) { $ updated += $ this -> updateI18n ( $ i18nValues , $ ids ) ; } return $ updated ; }
Update a record in the database.

@param  array  $values
@return int
Update a record in the database .