src/Query/FluentQuery.php
public function update_or_create( array $attributes, array $values ) {

		$model = $this->first_or_new( $attributes );
		$model->fill( $values )->save();

		return $model;
	}
public function update_or_create( array $attributes, array $values ) {

		$model = $this->first_or_new( $attributes );
		$model->fill( $values )->save();

		return $model;
	}
Find a model matching a given set of attributes. If it does not exist,
a new model is constructed with the given set of attributes.

The model is then updated with the given set of values.

@since 2.0

@param array $attributes
@param array $values

@return Model