| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function newPivot(array $attributes = [], $exists = false) |
||
| 22 | { |
||
| 23 | $using = $this->using; |
||
| 24 | |||
| 25 | $pivot = $using |
||
| 26 | ? $using::fromRawAttributes($this->parent, $attributes, $this->table, $exists) |
||
| 27 | : MorphPivot::fromAttributes($this->parent, $attributes, $this->table, $exists); |
||
| 28 | |||
| 29 | $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey) |
||
| 30 | ->setMorphType($this->morphType) |
||
| 31 | ->setMorphClass($this->morphClass); |
||
| 32 | |||
| 33 | return $pivot; |
||
| 34 | } |
||
| 36 |