Tables associated with the models Post
, Tag
, Taggable
are in polymorphic relationship. If I delete a tag then still its tag_id
may have been used on taggables
table. Do I have to delete all of its associations manually ?
And what is the role of following code on Taggable model? The code seems to work without it.
public function taggables() {
return $this->morphTo();
}