mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 05:35:08 +08:00
Update User.php
保存用户信息时 realname 为空自动填充
This commit is contained in:
@@ -82,4 +82,9 @@ class User extends BaseModel
|
||||
{
|
||||
return $value ?: $this->username;
|
||||
}
|
||||
|
||||
public function setRealnameAttribute($value)
|
||||
{
|
||||
$this->attributes['realname'] = $value ?: $this->username;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user