toby/app/Infrastructure/Http/Resources/HolidayFormDataResource.php
Adrian Hopek c0cf2370fd Merge branch 'main' into directory-refactor
# Conflicts:
#	app/Architecture/Providers/AppServiceProvider.php
#	app/Eloquent/Observers/YearPeriodObserver.php
2022-01-26 09:12:06 +01:00

22 lines
420 B
PHP

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