Relation between 3 tables with pivot

Asked

Viewed 115 times

0

I have the following structure that I have to follow.

Films People People ( Actor, Cameraman, Director)

Where Each Person Types Hasmany People And Each Person Hasmany Movie

That is, Each film will have the fields Director, Cameraman, etc Where will be selected the People who are of this type.

The way I’m doing is not giving the expected result.

The list of tables is like this

People https://gist.github.com/lucassmacedo/e6528571a356eeaa358dc07c8e97d19c

Tables and Relations https://gist.github.com/lucassmacedo/928b4c2a1ef038e453cb8fc02edd2ee0

the idea that is in admin, can be registered as many people are needed within each gender, actor, director, etc

when I insert the data into the pivot table

he keeps overwriting the values

if the person has already been registered on land in another type

she overwrites

  • I think this might help you: https://answall.com/questions/193211/relationment-many-to-many-laravel-5/193258#193258

  • I see so seems problem of the structures made and logica employed

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.