mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
get user
This commit is contained in:
@@ -14,6 +14,10 @@ class HeadTeacher extends Model
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
|
||||
@@ -15,6 +15,10 @@ class Parentt extends Model
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
|
||||
@@ -15,6 +15,10 @@ class Student extends Model
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function schoolClass()
|
||||
{
|
||||
return $this->belongsTo(SchoolClass::class, 'class_id');
|
||||
|
||||
@@ -15,6 +15,10 @@ class Teacher extends Model
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function schoolClass()
|
||||
{
|
||||
return $this->hasOne(SchoolClass::class, 'classroom_teacher');
|
||||
|
||||
Reference in New Issue
Block a user