v6 update

This commit is contained in:
Mohit Panjwani
2022-01-10 16:06:17 +05:30
parent b770e6277f
commit bdea879273
722 changed files with 19047 additions and 9186 deletions

View File

@ -109,7 +109,7 @@ class User extends Authenticatable implements HasMedia
public function currency()
{
return $this->belongsTo(Currency::class);
return $this->belongsTo(Currency::class, 'currency_id');
}
public function creator()
@ -147,6 +147,21 @@ class User extends Authenticatable implements HasMedia
return $this->hasMany(UserSetting::class, 'user_id');
}
public function addresses()
{
return $this->hasMany(Address::class);
}
public function billingAddress()
{
return $this->hasOne(Address::class)->where('type', Address::BILLING_TYPE);
}
public function shippingAddress()
{
return $this->hasOne(Address::class)->where('type', Address::SHIPPING_TYPE);
}
/**
* Override the mail body for reset password notification mail.
*/