| xqd
@@ -17,4 +17,8 @@ class UserInfoModel extends BaseModel
|
|
|
public function getAgeAttribute(){
|
|
|
return !empty($this->attributes['birthday'])?birthday($this->attributes['birthday']):0;
|
|
|
}
|
|
|
+
|
|
|
+ public function user(){
|
|
|
+ return $this->hasOne(User::class,'user_id','id');
|
|
|
+ }
|
|
|
}
|