mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
ответ при создании
This commit is contained in:
@@ -14,4 +14,9 @@ class Parentt extends Model
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,4 +20,9 @@ class Student extends Model
|
||||
return $this->belongsTo(SchoolClass::class, 'class_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,4 +24,9 @@ class Teacher extends Model
|
||||
return $this->hasMany(Timetable::class);
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user