coupon code system eingeführt. coupons werden vom super admin gemanaged. coupons werden mit paddle synchronisiert und dort validiert. plus: einige mobil-optimierungen im tenant admin pwa.
This commit is contained in:
@@ -58,10 +58,13 @@ class CheckoutSession extends Model
|
||||
'package_snapshot' => 'array',
|
||||
'status_history' => 'array',
|
||||
'provider_metadata' => 'array',
|
||||
'coupon_snapshot' => 'array',
|
||||
'discount_breakdown' => 'array',
|
||||
'expires_at' => 'datetime',
|
||||
'completed_at' => 'datetime',
|
||||
'amount_subtotal' => 'decimal:2',
|
||||
'amount_total' => 'decimal:2',
|
||||
'amount_discount' => 'decimal:2',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -71,6 +74,8 @@ class CheckoutSession extends Model
|
||||
'status_history' => '[]',
|
||||
'package_snapshot' => '[]',
|
||||
'provider_metadata' => '[]',
|
||||
'coupon_snapshot' => '[]',
|
||||
'discount_breakdown' => '[]',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
@@ -88,6 +93,11 @@ class CheckoutSession extends Model
|
||||
return $this->belongsTo(Package::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function coupon(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Coupon::class);
|
||||
}
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->whereNotIn('status', [
|
||||
|
||||
Reference in New Issue
Block a user