I have the following Movies table and Actors table with a pivot table of Movie_Actor.
How do I create a pivot table Movie_Actor pivot table and provide many-to-many relationship with Eloquent and seed the Movie_Actor table with unique faker data between the Movies and Actors.
For example, 1 movie has many actors and Actors have many movies. If there are 20 movies and 80 Actors how can I build Faker data for the Movie_Actor.
ps. I have already provided Faker content for Movies and Actors
pps. I have search StackOverflow for other answers still struggling with this concept
ppps. I have watched Laracasts videos and YouTube series which cover this topic.
pppps. I know Laravel has generators which help create pivot tables
ppppps. I have tried to use the Laravel Documentation on Eloquent relationships
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire