I am reading laravel 5.2 docs to implement many to many polymorphic relation in my Laravel Application. I have Many models like Blog
, Question
, Photo
etc and I want to have Tagging system for all of them. I have created tags
table and other as follow
-blogs
-id (integer)
-name (string)
-questions
-id (integer)
-name (string)
-photos
-id (integer)
-name (string)
-tags
-id (integer)
-name (string)
-entity_tags (pivot table)
-id (integer)
-tag_id (integer)
-entity_id (integer)
-entity_type (name)
Now my question is how I will define a Many to Many Polymorphic relation?
The main problem is my pivot table is not following the laravel convention of using able
as suffix in table name and column name. Unfortunately I could not find any extra parameters documentation or example of using custom pivot table name and column names.
I have already study the document, My main problem is my table names are not according to laravel convention
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community