I
I
igoogex2019-04-18 19:06:13
Laravel
igoogex, 2019-04-18 19:06:13

Multiple relationships, many-to-many belongsToMany, right?

Hello, I am a complete beginner in php and even more so in Laravel.
Is it correct to use multiple relationships in a project, many-to-many belongsToMany?
Those. like a movie site. There is a post about a film, one film can have many genres->one genre can have many films, one film can have many countries involved in filming->one country can shoot many films, there can be about 10 such connections in this particular case. Is such an implementation via belongsToMany correct? As far as I can judge with my little knowledge, when displaying a post about a movie, there will be a lot of requests to the database. Or am I not understanding something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NubasLol, 2019-04-18
@NubasLol

Correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question