laravel-tagging
laravel-tagging copied to clipboard
TaggingUtility::slug does not support UPPERCASE tags
First off, THANK YOU, this tagging module is very useful and has been extensively implemented in my projects.
Couple issues I've found and started working on a branch with fixes but got deep in the weeds and realized a few things that I'll just itimize.
-
line 75 of TaggingUtility references
'delimiter' => config('taggable.delimiter', '-'),
should be'delimiter' => config('tagging.delimiter', '-'),
-
Adding support for uppercase tags looks like it was started at line 77 but upon further investigation the relationship model of tagging_tagged and tagging_tags relies on the tag_slug match which could become easily broken if one is manipulated without the other.
-
I changed lowercase to false but in my database the tagging_tagged->tag_slug remains uppercase but tagging_tags->slug becomes Pascal...
I will continue to work on this and hopefully provide a PR unless you immediately know how to support retaining tags as uppercase.
Thanks!!!
This is the most interesting ticket opened in a while. Thanks. I won't be able to dig into details on this until probably Saturday.
@rtconner did you get a chance to poke at this? I got sidetracked by other things.
I changed lowercase to false but in my database the tagging_tagged->tag_slug remains uppercase but tagging_tags->slug becomes Pascal...
I think this is not the correct way to do it.
You should php artisan vendor:publish --tag=config
and then modify the 'normalizer' value in there. I believe this is the correct way to do it.
<?php
return [
'normalizer' => 'strtoupper',
]