- add send CV status
This commit is contained in:
@@ -19,6 +19,19 @@ class CVRequest extends FormRequest
|
||||
'rodo' => 'nullable|string',
|
||||
'position' => 'nullable|string',
|
||||
'notes' => 'nullable|string',
|
||||
'sended' => 'nullable|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
protected function prepareForValidation(): void
|
||||
{
|
||||
$this->merge([
|
||||
'sended' => $this->toBoolean($this->sended),
|
||||
]);
|
||||
}
|
||||
|
||||
private function toBoolean($booleable): bool
|
||||
{
|
||||
return filter_var($booleable, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user