Basic implementation of payment methods
This commit is contained in:
@@ -154,7 +154,10 @@ class Event extends InstancedModel
|
||||
}
|
||||
|
||||
public function paymentMethods() : BelongsToMany {
|
||||
return $this->belongsToMany(AvailablePaymentMethod::class, 'event_payment_methods', 'event_id', 'available_payment_method_id')->withTimestamps();
|
||||
// Pivot verknüpft über den Slug (payment_methods.slug), nicht über die numerische id
|
||||
// von available_payment_methods -- die tenant-spezifische Instanz wird dadurch implizit
|
||||
// über den globalen SiteScope von AvailablePaymentMethod (gefiltert auf app('tenant')) aufgelöst.
|
||||
return $this->belongsToMany(AvailablePaymentMethod::class, 'event_payment_methods', 'event_id', 'slug', 'id', 'slug')->withTimestamps();
|
||||
}
|
||||
|
||||
public function resetContributingLocalGroups() {
|
||||
|
||||
Reference in New Issue
Block a user