gadreel's avatar

OfMany on nested relation

Hello.

I have table "leads" which has an one-to-many relationship with a table "communications". Each communication has a "start_date" which is stored in a table "scheduling" which has an one-to-one polymorphic relation with the "communications" table. The reason we did that it's because we have a similar tasks table which also has a schedule when is due etc...

I want to be able to get the leads with their upcoming communication but I cannot do that with Eloquent's ofMany because my aggregate it's not on the communication table but on the scheduling table. Any ideas?

0 likes
0 replies

Please or to participate in this conversation.