| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function items(): Collection |
||
| 32 | { |
||
| 33 | // Attribute bag is filled at moment of method call (inside the component view) |
||
| 34 | if ($this->attributes->has('untagged')) { |
||
| 35 | return collect($this->nav->untagged()->all()); |
||
|
|
|||
| 36 | } |
||
| 37 | |||
| 38 | if ($this->attributes->has('tagged')) { |
||
| 39 | return collect($this->nav->tagged(explode(',', $this->attributes->get('tagged')))->all()); |
||
| 40 | } |
||
| 41 | |||
| 42 | return collect($this->nav->all()); |
||
| 43 | } |
||
| 45 |