This commit is contained in:
Adrian Hopek
2022-04-22 14:06:39 +02:00
parent 26f248a3f1
commit 2a75534c52
4 changed files with 51 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ class UserRequest extends FormRequest
"employmentForm" => ["required", new Enum(EmploymentForm::class)],
"employmentDate" => ["required", "date_format:Y-m-d"],
"birthday" => ["nullable", "date_format:Y-m-d"],
"slackId" => [],
];
}
@@ -43,6 +44,7 @@ class UserRequest extends FormRequest
"employment_form" => $this->get("employmentForm"),
"employment_date" => $this->get("employmentDate"),
"birthday" => $this->get("birthday"),
"slack_id" => $this->get("slackId"),
];
}
}

View File

@@ -22,6 +22,7 @@ class UserFormDataResource extends JsonResource
"employmentForm" => $this->profile->employment_form,
"employmentDate" => $this->profile->employment_date->toDateString(),
"birthday" => $this->profile->birthday->toDateString(),
"slackId" => $this->profile->slack_id,
];
}
}