Basic implementation of payment methods

This commit is contained in:
2026-07-28 15:50:58 +02:00
parent afc91545a9
commit 6c9281516e
39 changed files with 749 additions and 24 deletions
+9
View File
@@ -153,6 +153,10 @@ class Event extends InstancedModel
return $this->belongsToMany(EatingHabit::class, 'event_allowed_eating_habits', 'event_id', 'eating_habit_id');
}
public function paymentMethods() : BelongsToMany {
return $this->belongsToMany(AvailablePaymentMethod::class, 'event_payment_methods', 'event_id', 'available_payment_method_id')->withTimestamps();
}
public function resetContributingLocalGroups() {
$this->localGroups()->detach();
$this->save();
@@ -163,6 +167,11 @@ class Event extends InstancedModel
$this->save();
}
public function resetPaymentMethods() {
$this->paymentMethods()->detach();
$this->save();
}
public function resetMangers() {
$this->eventManagers()->detach();
$this->save();