toby/app/Http/Resources/VacationLimitResource.php
Adrian Hopek 5a51f24342 #23 - wip
2022-01-21 15:17:59 +01:00

23 lines
456 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class VacationLimitResource extends JsonResource
{
public static $wrap = false;
public function toArray($request): array
{
return [
"id" => $this->id,
"user" => new UserResource($this->user),
"hasVacation" => $this->has_vacation,
"days" => $this->days,
];
}
}