cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
537 stars 72 forks source link

Tag user/owner #82

Closed scottybo closed 5 years ago

scottybo commented 5 years ago

Let's say we have a model "Widgets" and our system has 3 users. User A creates a Widget and tags it with "yellow,blue". User B creates a Widget and tags it with "yellow,pink". User C didn't set any tags for their Widget.

I now want to show User A and B the tags they've created or used.

So in the system I'll show User A "yellow,blue" and User B "yellow,pink". and User C will be told they haven't created any tags yet.

cviebrock commented 5 years ago

The package doesn't support something like this, out-of-the-box unfortunately. I'm definitely open to a PR to add this though ... it sounds like it could be useful.

One option would be to create/use an intermediate model -- UserWidget -- and tag that.