[doc] Using your own tag model #383
Unanswered
francoism90
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm really confused about the doc explaining how to use an own Tag model.
As you see, the
tags.php
config file already provides the key to overrule the tag model.This is also confusing, why should you overwrite the tag model here?
This is the default method that lives inside the
HasTags
trait:This seems to be using the tag model configured in
tags.php
. I don't think it is necessary (or even wanted) to overrulegetTagClassName()
?I don't think this is necessary either, as the default also points to the custom tag model.
Would this be the solution:
And simple set
'tag_model' => App\Models\Tag::class
?Maybe I'm not understanding this correctly, but wasn't the model solution through the
config/tags.php
introduced not so long ago and this was before this solution?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions