diff --git a/src/HasTags.php b/src/HasTags.php index a45820b..959b1b0 100644 --- a/src/HasTags.php +++ b/src/HasTags.php @@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\MorphPivot; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Arr; use InvalidArgumentException; @@ -31,7 +32,7 @@ public function getTaggableTableName(): string public function getPivotModelClassName(): string { - return config('tags.taggable.class_name'); + return config('tags.taggable.class_name', MorphPivot::class); } public static function bootHasTags()