Basic implementation of payment methods
This commit is contained in:
1 parent
afc91545a9
commit
6c9281516e
39 files changed
+749
-24
No files matched your search
@@ -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