mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
v6 update
This commit is contained in:
@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user