rtconner / laravel-tagging

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

Untag question #139

Closed chloealee closed 7 years ago

chloealee commented 7 years ago

Hello,

I'm using this laravel-tagging for the first time and love it so far! I've noticed that when I use untag (e.g. $post->untag($tag);), it doesn't remove it from the tagging_tagged table. Is it supposed to?

Thanks!

haheute commented 7 years ago

Here it removes from tagging_tagged. There is a configuration option in config/tagging.php : 'delete_unused_tags'=>true for removing from tagging_tags table. Perhaps you mean this(?)

chloealee commented 7 years ago

thanks for getting back to me so quickly, @haheute !

If I use the untag function to remove a tag from a post, I want it to be deleted not only from the tagged array on the post, but also in the tagging_tagged table, not the tagging_tags table. Is there a way to do this currently?

rtconner commented 7 years ago

Change delete_unused_tags to false.

chloealee commented 7 years ago

@rtconner that didn't seem to work :-/

chloealee commented 7 years ago

@rtconner when using the untag function, is it supposed to remove the record from the tagging_tagged table?

rtconner commented 7 years ago

Yep.

chloealee commented 7 years ago

Okay, thanks!