fix(customer): save only profile fields on admin PUT

The list edit dumped the whole table row into update(); whitelist form and accounting fields, and skip hashing an empty password.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 11:18:59 +03:30
co-authored by Cursor
parent 91a2dab440
commit b54f9f0527
2 changed files with 53 additions and 15 deletions
+3
View File
@@ -130,6 +130,9 @@ class Customer extends Authenticatable implements JWTSubject
// hash password
public function setPasswordAttribute($value){
if ($value === null || $value === '') {
return;
}
$this->attributes['password'] = Hash::make($value);
}