Hey everyone, I'm looking for a way to create a two sided dynamic polymorphic relationship where I can attach different models to different other models. I can't use the default Polymorphic relationship since I won't know any of the model types. I have the following table structure, and I would like to have one global assignments table where all the relations are stored.
Models:
- Contact
- Company
- Note
- File
- etc.
Basically every model should be assignable to every other model, so I would like to attach a note to a company and a contact, and a file to a note, but a file also to a company. And I do not wan't thousand tables notables, fileables, etc. I would like to have a table assignments with the fields (assignable_{type,id} and assigned_to_{type,id} but I'm not sure on how to do that with Eloquent