Basic implementation of payment methods
This commit is contained in:
@@ -37,6 +37,8 @@ class AvailablePaymentMethod extends InstancedModel
|
||||
|
||||
public function events(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Event::class, 'event_payment_methods')->withTimestamps();
|
||||
// Pivot verknüpft über den Slug -- Event::paymentMethods() greift daher automatisch nur
|
||||
// auf Events des aktuell gebundenen Tenants zu (SiteScope auf Event + AvailablePaymentMethod).
|
||||
return $this->belongsToMany(Event::class, 'event_payment_methods', 'slug', 'event_id', 'slug', 'id')->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user