How to get the related list of tags via pivot table #1409
-
I want to be able to get the list of related tags of TaskCategory. Tags are related to the TaskCategory via Taggable pivot table. I have the following tables: TaskCategory table
Task table: child of TaskCategory.
Tags Table: it can be attached to any other model not just Task, that's why no related id is defined here.
Pivot table for Tag and any other model that need to have tag attached to it. This table will be responsible to attach or remove tags from models like Tasks or TaskCategories or any other model that need some tags.
This is how I get multiple related tasks of taskCategory so that I can display the TaskCategories along with it's Tasks in same place. But I don't know how to also get the multiple related tags of taskCategory. TaskCategoryWithTasksAndTags
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Any suggestion please? |
Beta Was this translation helpful? Give feedback.
Any suggestion please?