I'm trying to work with foreign keys on Laravel. It's quite simple how to add foreign key on table. But if table can contain more than one foreign key, for example:
There is tables:
Building
id
name
companies(can be more than one)
and other table is:
Companies
id
name
As I remember from good practices, I should create other table like building_company with columns
building_id
company_id
If it's in good way, how Model of this 3rd table should be named and used, or maybe in Laravel there is other solutions for multiple FKs?
Thank you