| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 16 | public function toArray($request)  | 
            ||
| 17 |     { | 
            ||
| 18 | return [  | 
            ||
| 19 | 'id' => $this->id,  | 
            ||
| 20 | 'title' => $this->title,  | 
            ||
| 21 | 'comments_count' => $this->comments()->count(),  | 
            ||
| 22 | 'resource' => $this->resource->resource,  | 
            ||
| 23 | 'testimony' => $this->testimony,  | 
            ||
| 24 | 'approved' => (bool) $this->approved,  | 
            ||
| 25 | 'user' => $this->user,  | 
            ||
| 26 | 'date' => Helper::getDates($this->created_at),  | 
            ||
| 27 | 'images' => Image::collection($this->images),  | 
            ||
| 28 | ];  | 
            ||
| 29 | }  | 
            ||
| 30 | }  | 
            ||
| 31 |