This commit is contained in:
f4ilji
2024-11-18 01:37:28 +05:00
parent af69b48247
commit 4b103325f7
12 changed files with 165 additions and 15 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ class Department extends Model
public function workers()
{
return $this->belongsToMany(User::class, 'workers_departments')->withPivot(['position']);
return $this->belongsToMany(User::class, 'workers_departments')->withPivot(['position', 'sort', 'service_email', 'service_phone', 'cabinet']);
}
public function programs()
@@ -37,6 +37,6 @@ class Department extends Model
public function teachers()
{
return $this->belongsToMany(User::class, 'teachers_departments')->withPivot(['teaching_position']);
return $this->belongsToMany(User::class, 'teachers_departments')->withPivot(['teaching_position', 'sort', 'service_email', 'service_phone', 'cabinet']);
}
}