public function update(array $attributes = [], array $options = [])
{
if (!$this->exists) {
// If dirty attributes contains binary field
// extract binary fields to new array
if ($this->extractBinaries($dirty)) {
return $this->newQuery()->updateLob($attributes, $this->binaryFields, $this->getKeyName());
}
return $this->newQuery()->update($attributes);
}
return $this->fill($attributes)->save();
}