for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
/** @mixin \App\Models\Proposal */
class ProposalResource extends JsonResource
{
public function toArray($request): array
return [
'title' => $this->title,
title
App\Http\Resources\ProposalResource
__get
'body' => $this->body,
body
'created_at' => $this->created_at,
created_at
'updated_at' => $this->updated_at,
updated_at
'user_id' => $this->user->getRouteKey(),
user
'school_id' => $this->school->getRouteKey(),
school
];
}