Yajra\Oci8\Eloquent\OracleEloquent::performUpdate PHP Méthode

performUpdate() protected méthode

Perform a model update operation.
protected performUpdate ( Builder $query, array $options = [] ) : boolean
$query Illuminate\Database\Eloquent\Builder
$options array
Résultat boolean
    protected function performUpdate(Builder $query, array $options = [])
    {
        $dirty = $this->getDirty();
        if (count($dirty) > 0) {
            // If the updating event returns false, we will cancel the update operation so
            // developers can hook Validation systems into their models and cancel this
            // operation if the model does not pass validation. Otherwise, we update.
            if ($this->fireModelEvent('updating') === false) {
                return false;
            }
            // First we need to create a fresh query instance and touch the creation and
            // update timestamp on the model which are maintained by us for developer
            // convenience. Then we will just continue saving the model instances.
            if ($this->timestamps && array_get($options, 'timestamps', true)) {
                $this->updateTimestamps();
            }
            // Once we have run the update operation, we will fire the "updated" event for
            // this model instance. This will allow developers to hook into these after
            // models are updated, giving them a chance to do any special processing.
            $dirty = $this->getDirty();
            if (count($dirty) > 0) {
                // If dirty attributes contains binary field
                // extract binary fields to new array
                $this->updateBinary($query, $dirty, $options);
                $this->fireModelEvent('updated', false);
            }
        }
        return true;
    }