| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function toArray($request): array |
||
| 24 | { |
||
| 25 | return [ |
||
| 26 | 'id' => $this->id, |
||
|
|
|||
| 27 | 'name' => $this->name, |
||
| 28 | 'slug' => $this->slug instanceof Slug ? $this->slug->key : $this->slug, |
||
| 29 | 'description' => $this->description, |
||
| 30 | 'content' => $this->content, |
||
| 31 | 'image' => $this->image ? RvMedia::url($this->image) : null, |
||
| 32 | 'categories' => CategoryResource::collection($this->categories), |
||
| 33 | 'tags' => TagResource::collection($this->tags), |
||
| 34 | 'author' => AuthorResource::make($this->author), |
||
| 35 | 'created_at' => $this->created_at, |
||
| 36 | 'updated_at' => $this->updated_at, |
||
| 37 | ]; |
||
| 40 |