Check out polymorphic relationships, your account can morph into one of the three other tables
Referencing multiple models
Hey there,
I just started developing with Laravel and of course I choose the most difficult project to start with... (probably not, but for me it is)
I'm trying to create a small page for managing accounts and login information for various services and types.
And therein lies the problem: I have 3 tables: domains, providers and projects. All of these can have a One-to-Many relationship with a table called accounts. The thing is, an account can never have more than one domain, project or provider associated with it, but the only way I see to connect all this is through pivot tables for every relationship type: account_domain, account_project, ... which would not be correct as I understand it, since pivot tables represent Many-to-Many relationships.
Am I missing something? Can someone point me in the right direction? Thanks :)
Please or to participate in this conversation.