src/Model/HasAttributes.php
public function mergeRawAttributes(array $attributes, $sync = false, $force = false)
    {
        foreach ($attributes as $key => $value) {
            if ($force || ((! $force) && (! $this->hasAttribute($key)))) {
                $this->setAttribute($key, $value);
            }
        }

        if ($sync) {
            $this->syncOriginal();
        }

        return $this;
    }
public function mergeRawAttributes(array $attributes, $sync = false, $force = false)
    {
        foreach ($attributes as $key => $value) {
            if ($force || ((! $force) && (! $this->hasAttribute($key)))) {
                $this->setAttribute($key, $value);
            }
        }

        if ($sync) {
            $this->syncOriginal();
        }

        return $this;
    }
public function mergeRawAttributes ( array $ attributes , $ sync = false , $ force = false ) { foreach ( $ attributes as $ key => $ value ) { if ( $ force || ( ( ! $ force ) && ( ! $ this -> hasAttribute ( $ key ) ) ) ) { $ this -> setAttribute ( $ key , $ value ) ; } } if ( $ sync ) { $ this -> syncOriginal ( ) ; } return $ this ; }
Set the array of model attributes.

@param  array  $attributes
@param  bool  $sync
@param  bool  $force Force change value if exists.
@return $this
Set the array of model attributes .