This commit is contained in:
Adrian Hopek
2022-04-20 13:24:56 +02:00
parent d6e29affdd
commit 847d929c77
15 changed files with 132 additions and 45 deletions

View File

@@ -1,21 +0,0 @@
<?php
declare(strict_types=1);
namespace Toby\Infrastructure\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class AbsenceResource extends JsonResource
{
public static $wrap = null;
public function toArray($request): array
{
return [
"id" => $this->id,
"user" => new SimpleUserResource($this->user),
"date" => $this->date->toDisplayString(),
];
}
}

View File

@@ -14,6 +14,7 @@ class VacationResource extends JsonResource
{
return [
"id" => $this->id,
"user" => new SimpleUserResource($this->user),
"displayDate" => $this->date->toDisplayString(),
"date" => $this->date->toDateString(),
];