Merge pull request #41 from wxfjamdc/patch-2

Update User.php
This commit is contained in:
刀刀
2021-01-23 18:46:30 +08:00
committed by GitHub

View File

@@ -82,4 +82,9 @@ class User extends BaseModel
{
return $value ?: $this->username;
}
public function setRealnameAttribute($value)
{
$this->attributes['realname'] = $value ?: $this->username;
}
}