Basic implementation of payment methods
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user