mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
общий код
This commit is contained in:
@@ -12,12 +12,11 @@ class SchoolClass extends Model
|
||||
protected $fillable = [
|
||||
'number',
|
||||
'letter',
|
||||
'count_students',
|
||||
'profile',
|
||||
];
|
||||
|
||||
public function teacher()
|
||||
public function students()
|
||||
{
|
||||
return $this->belongsTo(Teacher::class, 'classroom_teacher');
|
||||
return $this->hasMany(Student::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user