I have two users: teachers and students, each of them has different attributes. For example: student has one class, teacher has many classes, etc.
I would like to inherit OctoberCMS Users plugin, and add two controllers with these additional attributes (one for students and another for teachers). So, I've created two models extending user model. these 2 models use the same users table, and I added two tables for teachers and students, but I can't link them with the user table.
This is what I did:
class Teacher extends User
{
public $hasOne=[
'mobile'=>'??',
]
}
So, I want to add a mobile field and other fields to every teacher in the teachers table, how can I do this?
Please note that I don't want to add fields to the users table. I want the shared columns in user table, teacher additional fields in teacher table, and student additional fields in students table.