This commit is contained in:
Adrian Hopek
2022-05-09 15:03:09 +02:00
parent 47ad45cb73
commit 37ce3262ac
25 changed files with 1843 additions and 806 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Toby\Infrastructure\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ResumeFormResource extends JsonResource
{
public static $wrap = null;
public function toArray($request): array
{
return [
"id" => $this->id,
"user" => $this->user_id,
"name" => $this->name,
"description" => $this->description,
"education" => $this->education,
"languages" => $this->languages,
"technologies" => $this->technologies,
"projects" => $this->projects,
];
}
}

View File

@@ -0,0 +1,24 @@
<?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(),
];
}
}