This commit is contained in:
Adrian Hopek
2022-01-24 11:21:00 +01:00
parent 03af084c04
commit 36b98e1e67
13 changed files with 54 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ use Illuminate\Http\Resources\Json\JsonResource;
class UserFormDataResource extends JsonResource
{
public static $wrap = false;
public static $wrap = null;
public function toArray($request): array
{

View File

@@ -8,14 +8,14 @@ use Illuminate\Http\Resources\Json\JsonResource;
class VacationLimitResource extends JsonResource
{
public static $wrap = false;
public static $wrap = null;
public function toArray($request): array
{
return [
"id" => $this->id,
"user" => new UserResource($this->user),
"hasVacation" => $this->has_vacation,
"hasVacation" => $this->hasVacation(),
"days" => $this->days,
];
}