Take a many-to-many polymorphic relationship sample from the Laravel docs website.
posts
id - integer
name - string
videos
id - integer
name - string
tags
id - integer
name - string
taggables
tag_id - integer
taggable_id - integer
taggable_type - string
extra_column_a - string
extra_column_b - integer
How to insert data into the extra_column_a
and extra_column_b
column when creating a post/video with tag or when creating a tag with post/video?
Do I need to create a model class for the taggables
table when it has extra columns?