diff --git a/src/Database/Traits/Multisite.php b/src/Database/Traits/Multisite.php index b777618b5..5d98ce907 100644 --- a/src/Database/Traits/Multisite.php +++ b/src/Database/Traits/Multisite.php @@ -174,7 +174,7 @@ public function canDeleteMultisiteRelation($name, $type = null): bool $type = $this->getRelationType($name); } - if (!in_array($type, ['belongsToMany', 'belongsTo', 'hasOne', 'hasMany', 'attachOne', 'attachMany'])) { + if (!in_array($type, ['belongsToMany', 'morphedByMany', 'belongsTo', 'hasOne', 'hasMany', 'attachOne', 'attachMany'])) { return false; } @@ -185,7 +185,7 @@ public function canDeleteMultisiteRelation($name, $type = null): bool /** * defineMultisiteRelation will modify defined relations on this model so they share * their association using the shared identifier (`site_root_id`). Only these relation - * types support relation sharing: `belongsToMany`, `morphedByMany`, `morphToMany`, + * types support relation sharing: `belongsToMany`, `morphedByMany`, * `belongsTo`, `hasOne`, `hasMany`, `attachOne`, `attachMany`. */ protected function defineMultisiteRelation($name, $type = null) @@ -203,9 +203,6 @@ protected function defineMultisiteRelation($name, $type = null) if (in_array($type, ['belongsToMany', 'morphedByMany'])) { $this->$type[$name]['parentKey'] = 'site_root_id'; } - elseif (in_array($type, ['morphToMany'])) { - $this->$type[$name]['relatedKey'] = 'site_root_id'; - } elseif (in_array($type, ['belongsTo', 'hasOne', 'hasMany'])) { $this->$type[$name]['otherKey'] = 'site_root_id'; }