diff --git a/src/HasTags.php b/src/HasTags.php index 78beab7..41c8f87 100644 --- a/src/HasTags.php +++ b/src/HasTags.php @@ -269,7 +269,7 @@ protected function syncTagIds($ids, string | null $type = null, $detaching = tru ->where($this->getTaggableMorphName() . '_type', $this->getMorphClass()) ->join( $tagModel->getTable(), - 'taggables.tag_id', + $this->getTaggableTableName() . '.tag_id', '=', $tagModel->getTable() . '.' . $tagModel->getKeyName() )