Issues (48)

src/Http/Resources/Guest.php (1 issue)

1
<?php
2
3
namespace Innoflash\Events\Http\Resources;
4
5
use FaithGen\SDK\Helpers\ImageHelper;
6
use Illuminate\Http\Resources\Json\JsonResource;
7
8
class Guest extends JsonResource
9
{
10
    /**
11
     * Transform the resource into an array.
12
     *
13
     * @param \Illuminate\Http\Request $request
14
     * @return array
15
     */
16
    public function toArray($request)
17
    {
18
        return array_merge(parent::toArray($request), [
19
            'avatar' => ImageHelper::getImage('events', $this->image, config('faithgen-sdk.ministries-server')),
0 ignored issues
show
Bug Best Practice introduced by
The property image does not exist on Innoflash\Events\Http\Resources\Guest. Since you implemented __get, consider adding a @property annotation.
Loading history...
20
        ]);
21
    }
22
}
23