| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function toArray($request): array |
||
| 20 | { |
||
| 21 | /** @var Category $this */ |
||
| 22 | |||
| 23 | return [ |
||
| 24 | 'id' => $this->id, |
||
| 25 | 'name' => $this->name, |
||
| 26 | 'slug' => $this->slug, |
||
| 27 | 'icon' => $this->icon, |
||
| 28 | 'description' => $this->description, |
||
| 29 | 'children' => CategoryResource::collection($this->children), |
||
| 30 | 'parent' => new CategoryResource($this->parent), |
||
| 31 | ]; |
||
| 34 |