| Conditions | 2 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | protected function getCurrentlyAttachedPivots() |
||
| 15 | { |
||
| 16 | return $this->newPivotQuery()->get()->map(function ($record) { |
||
|
|
|||
| 17 | $class = $this->using ? $this->using : Pivot::class; |
||
| 18 | |||
| 19 | $pivot = $class::fromRawAttributes($this->parent, (array)$record, $this->getTable(), true); |
||
| 20 | |||
| 21 | return $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey); |
||
| 22 | }); |
||
| 25 |