I have a relation database like this
5511
and i made a model for each table
how can i defined the relation between tables from models , so every time i get a student i can get his teacher name and his courses and the courses detail ??
I have a relation database like this
5511
and i made a model for each table
how can i defined the relation between tables from models , so every time i get a student i can get his teacher name and his courses and the courses detail ??
Check Yii2 documentation here, it explains how to define relations in the new style