mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 23:24:03 +00:00
Add feature that allow to determine when model is syncable
This commit is contained in:
parent
51228defc6
commit
9155e32ba8
4 changed files with 80 additions and 7 deletions
|
|
@ -16,7 +16,7 @@ class TenantPivot extends Pivot
|
|||
static::saved(function (self $pivot) {
|
||||
$parent = $pivot->pivotParent;
|
||||
|
||||
if ($parent instanceof Syncable) {
|
||||
if ($parent instanceof Syncable && $parent->isSyncEnabled()) {
|
||||
$parent->triggerSyncEvent();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue