1 | <?php |
||
2 | |||
3 | namespace App\Http\Resources; |
||
4 | |||
5 | use Illuminate\Http\Resources\Json\JsonResource; |
||
6 | |||
7 | /** @mixin \App\Models\Proposal */ |
||
8 | class ProposalResource extends JsonResource |
||
9 | { |
||
10 | public function toArray($request): array |
||
11 | { |
||
12 | return [ |
||
13 | 'title' => $this->title, |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
14 | 'body' => $this->body, |
||
0 ignored issues
–
show
The property
body does not exist on App\Http\Resources\ProposalResource . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
15 | 'created_at' => $this->created_at, |
||
0 ignored issues
–
show
The property
created_at does not exist on App\Http\Resources\ProposalResource . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
16 | 'updated_at' => $this->updated_at, |
||
0 ignored issues
–
show
The property
updated_at does not exist on App\Http\Resources\ProposalResource . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
17 | 'user_id' => $this->user->getRouteKey(), |
||
0 ignored issues
–
show
The property
user does not exist on App\Http\Resources\ProposalResource . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
18 | 'school_id' => $this->school->getRouteKey(), |
||
0 ignored issues
–
show
The property
school does not exist on App\Http\Resources\ProposalResource . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
19 | ]; |
||
20 | } |
||
21 | } |
||
22 |