Update E-Sign

This commit is contained in:
Daeng Deni Mardaeni
2024-09-19 14:49:13 +07:00
parent 47f248c7b3
commit 2850902c64
8 changed files with 145 additions and 9 deletions

View File

@@ -24,9 +24,10 @@
'name' => 'required|string|max:255',
'branch_id' => 'nullable|exists:branches,id',
'profile_photo_path' => 'nullable|image|mimes:jpeg,png,jpg|max:2048',
'sign' => 'nullable|image|mimes:jpeg,png,jpg|max:2048',
];
if ($this->password) {
if ($this->password !==null) {
$rules['password'] = 'required|string|min:8|confirmed';
}
@@ -43,7 +44,7 @@
public function passedValidation()
{
if ($this->password!=='') {
if ($this->password !== null) {
$this->merge([
'password' => Hash::make($this->password),
]);