Basic implementation of payment methods

This commit is contained in:
2026-07-28 16:09:38 +02:00
parent 6c9281516e
commit ab3d526217
13 changed files with 34 additions and 15 deletions
+3 -1
View File
@@ -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();
}
}