1 | <?php |
||
2 | |||
3 | namespace FaithGen\SDK\Http\Resources; |
||
4 | |||
5 | use FaithGen\SDK\Helpers\ImageHelper; |
||
6 | use Illuminate\Http\Resources\Json\JsonResource; |
||
7 | use InnoFlash\LaraStart\Helper; |
||
8 | |||
9 | class MinistryUser extends JsonResource |
||
10 | { |
||
11 | public function toArray($request) |
||
12 | { |
||
13 | return [ |
||
14 | 'id' => $this->user_id, |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
15 | 'active' => (bool) $this->active, |
||
0 ignored issues
–
show
The property
active does not exist on FaithGen\SDK\Http\Resources\MinistryUser . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
16 | 'name' => $this->user->name, |
||
0 ignored issues
–
show
The property
user does not exist on FaithGen\SDK\Http\Resources\MinistryUser . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
17 | 'email' => $this->user->email, |
||
18 | 'phone' => $this->user->phone, |
||
19 | 'provider' => $this->user->provider, |
||
20 | 'avatar' => ImageHelper::getImage('users', $this->user->image, config('faithgen-sdk.users-server')), |
||
21 | 'joined' => Helper::getDates($this->created_at), |
||
0 ignored issues
–
show
The property
created_at does not exist on FaithGen\SDK\Http\Resources\MinistryUser . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
22 | ]; |
||
23 | } |
||
24 | } |
||
25 |