Level 51
What exactly do you want to query? what data do you want to retrieve?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have this table / models:
lesson table and teacher table with pivot lesson_teacher table.
Then I have this registration table, with fields id, student_id, lesson_teacher_id.
And lastly, I have this student table
My question is what is the best way to query the relationships above.
Please or to participate in this conversation.