| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | protected function onEdit(): array |
||
| 24 | { |
||
| 25 | $relation = $this->model->{$this->id()}(); |
||
| 26 | |||
| 27 | $related = $relation->getRelated(); |
||
| 28 | $columns = $this->collectColumns($related) |
||
| 29 | ->without(array_merge([$related->getKeyName()], $this->except ?? [])) |
||
| 30 | ->only($this->only) |
||
| 31 | ->each(function ($field) { |
||
| 32 | $field->setId( |
||
| 33 | "{$this->id()}.{$field->id()}" |
||
| 34 | ); |
||
| 35 | }); |
||
| 36 | |||
| 37 | return [ |
||
| 38 | 'columns' => $columns, |
||
| 39 | ]; |
||
| 63 | } |