Closed antonkomarev closed 7 years ago
This can partially be accomplished with the normalizer
configuration: if you create a function or class method that can convert formula-1
and formula1
into a normalized string, or friends
into friends
, then this is already supported when tagging new models.
If you want to do this after the fact (i.e. you already have models that are tagged one way and you want to convert them), then I can add a method to the service class, something like:
TagService::rename('formula1', 'formula-1', \App\Articles::class);
The third argument is an optional classname to restrict the renaming.
Does that make sense?
This is in place on the new 3.x branch (in dev right now). Feel free to checkout dev-master
and give it a try.
This is an enhancement which could be helpful to manage unwanted typos or spellings of the words and remove tags duplicates. For example you have 100 tags
formula-1
and 20 tagsformula1
. You want to leave onlyformula-1
tag as a valid one and replace all theformula1
tags in all the entities withformula-1
. Another one example is merge of plural and singular tagsfriend
orfriends
.Here what configuration options I could find usable:
(bool)
Automatically replace on tagging all appearances offormula1
withformula-1
.I suppose there should be separate database table which will keep all the merge rules.