| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | trait HasFieldsCollection |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The layout's registered fields. |
||
| 12 | */ |
||
| 13 | protected ?FieldCollection $fields = null; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Provided by developer fields. |
||
| 17 | */ |
||
| 18 | 2 | protected function fields(): array |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Retrieve the layout's fields as a collection. |
||
| 25 | */ |
||
| 26 | 17 | public function fieldsCollection(): FieldCollection |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Filter the layout's fields for detail view. |
||
| 38 | */ |
||
| 39 | 1 | public function filterForDetail(NovaRequest $request, mixed $resource): static |
|
| 46 |