Merge branch 'backend' of https://github.com/nakazawakan/kikikanri into p_account
このコミットが含まれているのは:
コミット
728ca31330
|
@ -14,6 +14,14 @@ class FatherRelationsController extends Controller {
|
|||
return ['status_code' => 400, 'error_messages' => ['子の追加に失敗しました。']];
|
||||
}
|
||||
|
||||
$validate = Validator::make($r->all(), [
|
||||
'identity' => 'required|max:20|alpha_num',
|
||||
]);
|
||||
|
||||
if ($validate->fails()) {
|
||||
return ['status_code' => 422, 'error_messages' => $validate->errors()];
|
||||
}
|
||||
|
||||
if (null === ($child = Child::select('id')->where('identity', $r->identity)->first())) {
|
||||
return ['status_code' => 400, 'error_messages' => ['子の追加に失敗しました。']];
|
||||
}
|
||||
|
@ -43,6 +51,14 @@ class FatherRelationsController extends Controller {
|
|||
return ['status_code' => 400, 'error_messages' => ['子の入社日の更新に失敗しました。']];
|
||||
}
|
||||
|
||||
$validate = Validator::make($r->all(), [
|
||||
'hire_at' => 'date',
|
||||
]);
|
||||
|
||||
if ($validate->fails()) {
|
||||
return ['status_code' => 422, 'error_messages' => $validate->errors()];
|
||||
}
|
||||
|
||||
$update = [
|
||||
'hire_at' => date('Y-m-d H:i:s', strtotime($r->hire_at)),
|
||||
];
|
||||
|
|
新しいイシューから参照