Merge branch 'main' into directory-refactor

# Conflicts:
#	app/Architecture/Providers/AppServiceProvider.php
#	app/Eloquent/Observers/YearPeriodObserver.php
This commit is contained in:
Adrian Hopek
2022-01-26 08:58:57 +01:00
33 changed files with 979 additions and 55 deletions

View File

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