public function reload()
{
if ($this->exists || $this->areSoftDeletesEnabled() && $this->trashed()) {
$fresh = $this->getFreshInstance();
if (is_null($fresh)) {
throw with(new ModelNotFoundException())->setModel(get_called_class());
}
$this->setRawAttributes($fresh->getAttributes(), true);
$this->setRelations($fresh->getRelations());
$this->exists = $fresh->exists;
} else {
// Revert changes if model is not persisted
$this->attributes = $this->original;
}
return $this;
}