Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function toArray($request) |
||
19 | { |
||
20 | return [ |
||
21 | 'id' => $this->id, |
||
|
|||
22 | 'title' => $this->title, |
||
23 | 'comments' => $this->comments()->count(), |
||
24 | 'comments' => [ |
||
25 | 'count' => number_format($this->comments()->count()), |
||
26 | ], |
||
27 | 'preacher' => [ |
||
28 | 'name' => $this->preacher, |
||
29 | 'avatar' => ImageHelper::getImage('sermons', $this->image, config('faithgen-sdk.ministries-server')), |
||
30 | ], |
||
31 | 'date' => Helper::getDates(Carbon::parse($this->date)), |
||
32 | 'resource' => $this['resource'], |
||
33 | 'verses' => [ |
||
34 | 'main' => $this->main_verses, |
||
35 | 'reference' => $this->reference_verses, |
||
36 | ], |
||
37 | 'sermon' => $this->sermon, |
||
38 | ]; |
||
41 |