| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 2 | public function toArray($request) |
|
| 16 | { |
||
| 17 | return [ |
||
| 18 | 2 | 'type' => 'contact', |
|
| 19 | 2 | 'id' => (string) $this->id, |
|
|
|
|||
| 20 | 'attributes' => [ |
||
| 21 | 2 | 'name' => $this->name, |
|
| 22 | 2 | 'user_id' => $this->user_id, |
|
| 23 | 2 | 'user' => new UserResource($this->whenLoaded('user')), |
|
| 24 | 2 | 'source' => new UserResource($this->whenLoaded('source')), |
|
| 25 | 2 | 'created_at' => $this->created_at, |
|
| 26 | 2 | 'updated_at' => $this->updated_at, |
|
| 27 | ], |
||
| 31 |