toby/app/Infrastructure/Http/Resources/VacationResource.php
Adrian Hopek c95d08c861
#120 - remote work (#127)
* #120 - wip

* #120 - add icon to home office

* #120 - wip

* #120 - wip

* #120 - wip

* #120 - wip

* #120 - wip

* #120 - ui fixes

* #120 - fix

* #120 - fix

* #120 - fix

* #120 - fix

* #120 - translation fix

* #120 - fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
2022-04-21 07:44:22 +02:00

23 lines
498 B
PHP

<?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,
"user" => new SimpleUserResource($this->user),
"displayDate" => $this->date->toDisplayString(),
"date" => $this->date->toDateString(),
];
}
}