jvbalcita
1 month ago
221
6
Laravel

Inverse Relationship

Posted 1 month ago by jvbalcita

This seems to be a simple question but I'm trying to figure it out.

I have the below Models


Student -> BelongsTo Course

Course -> BelongsToMany Teachers

Teacher-> BelongsToMany Courses

This means that Teacher is linked to Student via Courses

Now I want to pull the Students with Teachers

Thank you in advance for all your help.

Please sign in or create an account to participate in this conversation.