Skip to content

Commit

Permalink
make fix in other location
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 27, 2017
1 parent eabc99e commit 063e5ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function newPivot(array $attributes = [], $exists = false)
{
$using = $this->using;

$pivot = $using ? new $using($this->parent, $attributes, $this->table, $exists)
$pivot = $using ? $using::fromRawAttributes($this->parent, $attributes, $this->table, $exists)
: new MorphPivot($this->parent, $attributes, $this->table, $exists);

$pivot->setPivotKeys($this->foreignKey, $this->relatedKey)
Expand Down

0 comments on commit 063e5ae

Please sign in to comment.