rtconner / laravel-tagging

Tag support for Laravel Eloquent models - Taggable Trait
MIT License
882 stars 168 forks source link

Best way to "scope" the tags? #135

Closed mcblum closed 5 years ago

mcblum commented 7 years ago

Thank you for your work on this.

We have an app where a user can belong to many events. An interesting challenge is that when we tag the user, it's within the scope of that particular event. My initial thought was to use groups and make one tag group per event, but the issue is we also need specific tags for specific models, none of which we know in advance.

So basically what we need is for tagGroup Event 1 Tags with slug event-1-tags to have child groups called user-tags, session-tags, etc... and then on the frontend when we're suggesting we would say "fetch a list of tags with event-1-tags user-tags and get the tags for that event for users. In addition, we need to limit the tags that are shown with a user to that event only.

I realize we're going to have to make these changes, but if anyone has a good idea of how to do it, that would be awesome! Matt