toby/app/Infrastructure/Http/Resources/ResumeResource.php
Adrian Hopek 37ce3262ac wip
2022-05-09 15:03:09 +02:00

25 lines
598 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Infrastructure\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ResumeResource extends JsonResource
{
public static $wrap = null;
public function toArray($request): array
{
return [
"id" => $this->id,
"user" => new SimpleUserResource($this->user),
"name" => $this->name,
"description" => $this->description,
"createdAt" => $this->created_at->toDisplayString(),
"updatedAt" => $this->updated_at->toDisplayString(),
];
}
}