This commit is contained in:
Adrian Hopek
2022-02-07 14:37:14 +01:00
parent 6deb5b65e2
commit cc90851bca
22 changed files with 155 additions and 45 deletions

View File

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