You could also use a polymorphic many to many relationship which would require only one intermediate table
Doubt in table relationship in laravel?
Guys I am working with a project job portal site.
What’s my doubt is need a suggestion for table relationship.
Actually the project has skill_set table with fields id, name_of_skill_set.
Consider the data are inside the skill_set table
Html
Javascript,
Accounting,
Laravel,
Cakephp
So on.
This skill_set table must be used by both(job_seeker and employer ). Employer uses this skill_set table to post a job with the skill sets requirement and job_seeker uses this table to mention their skill sets.
So I made a relationship in this way is this right. Many-to-many relationship
There are 3 tables
job_posting table,
skill_set table,
job_seeker table
To link the skill_set table for both of them I made two intermediate tables like below,
Job_posting -->Job_skill (Intermediate table) -->skill_set table <--seeker_skill (Intermediate table) <-- Job_seeker
Is this right format or is there any other way to make this process further simple and reliable? Kindly suggest your ideas please..
That's what I suggested https://laravel.com/docs/5.7/eloquent-relationships#many-to-many-polymorphic-relations
Please or to participate in this conversation.