Issues (13)

app/Http/Resources/ProposalResource.php (6 issues)

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
The property title does not exist on App\Http\Resources\ProposalResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
14
            'body'       => $this->body,
0 ignored issues
show
Bug Best Practice introduced by
The property body does not exist on App\Http\Resources\ProposalResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
15
            'created_at' => $this->created_at,
0 ignored issues
show
Bug Best Practice introduced by
The property created_at does not exist on App\Http\Resources\ProposalResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
16
            'updated_at' => $this->updated_at,
0 ignored issues
show
Bug Best Practice introduced by
The property updated_at does not exist on App\Http\Resources\ProposalResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
17
            'user_id'    => $this->user->getRouteKey(),
0 ignored issues
show
Bug Best Practice introduced by
The property user does not exist on App\Http\Resources\ProposalResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
18
            'school_id'  => $this->school->getRouteKey(),
0 ignored issues
show
Bug Best Practice introduced by
The property school does not exist on App\Http\Resources\ProposalResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
19
        ];
20
    }
21
}
22