Skip to content

Commit

Permalink
Simplify MorphOneOrMany (#25864)
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir authored and taylorotwell committed Oct 2, 2018
1 parent 5e6473e commit f0312c1
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@ public function addEagerConstraints(array $models)
$this->query->where($this->morphType, $this->morphClass);
}

/**
* Attach a model instance to the parent model.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @return \Illuminate\Database\Eloquent\Model
*/
public function save(Model $model)
{
$model->setAttribute($this->getMorphType(), $this->morphClass);

return parent::save($model);
}

/**
* Set the foreign ID and type for creating a related model.
*
Expand Down

0 comments on commit f0312c1

Please sign in to comment.