Skip to content

Commit

Permalink
Define class MorphPivot as default for the 'tags.taggable.class_name'…
Browse files Browse the repository at this point in the history
… config getter. (#476)

Co-authored-by: Benno Eggnauer <[email protected]>
  • Loading branch information
eggnaube and Benno Eggnauer authored Jul 31, 2023
1 parent 77b61dc commit fcc6c53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/HasTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()
Expand Down

0 comments on commit fcc6c53

Please sign in to comment.