frontend & backend update

This commit is contained in:
carodej
2020-06-22 16:46:02 +02:00
parent a2cab6198e
commit a2dfc627a7
35 changed files with 595 additions and 1080 deletions

View File

@@ -65,7 +65,6 @@ use Rinvex\Subscriptions\Traits\HasSubscriptions;
* @property-read mixed $storage
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Invoice[] $invoices
* @property-read int|null $invoices_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\UserCard[] $payment_cards
* @property-read int|null $payment_cards_count
* @property-read \App\UserSettings|null $settings
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Cashier\Subscription[] $subscriptions
@@ -166,6 +165,7 @@ class User extends Authenticatable
* Set user billing info
*
* @param $billing
* @return UserSettings
*/
public function setBilling($billing)
{
@@ -178,6 +178,8 @@ class User extends Authenticatable
'billing_postal_code' => $billing['billing_postal_code'],
'billing_state' => $billing['billing_state'],
]);
return $this->settings;
}
/**
@@ -240,24 +242,4 @@ class User extends Authenticatable
{
return $this->hasOne(UserSettings::class);
}
/**
* Get user invoices
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function invoices()
{
return $this->hasMany(Invoice::class);
}
/**
* Get user payment cards
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function payment_cards()
{
return $this->hasMany(UserCard::class);
}
}