Detailing fungsi semua modul dari bugs error
This commit is contained in:
@@ -19,4 +19,12 @@ class Subject extends Model
|
||||
{
|
||||
return $this->hasMany(QuestionBank::class, 'subject_id');
|
||||
}
|
||||
|
||||
public function users() // atau employees()
|
||||
{
|
||||
// Paksa pencarian menggunakan 'user_id'
|
||||
return $this->belongsToMany(User::class, 'employee_subject', 'subject_id', 'user_id')
|
||||
->withPivot('status')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user