优化地址存储国家的字段
Showing
with
18 additions
and
4 deletions
Please
register
or
sign in
to comment
... | ... | @@ -19,4 +19,9 @@ class UserAddressModel extends Model |
return $this->belongsTo(UserModel::class); | ||
} | ||
public function country() | ||
{ | ||
return $this->hasOne(CountryModel::class, 'id', 'country'); | ||
} | ||
} |