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