mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 10:54:31 +00:00
модуль Задания(почти готов)
This commit is contained in:
@@ -8,6 +8,18 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Task extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable = ['name', 'description', 'deadline', 'teacher_id', 'subject_id'];
|
||||
|
||||
public function banktask() {
|
||||
return $this->hasMany(BankTask::class, 'class_task');
|
||||
}
|
||||
|
||||
public function teacher(){
|
||||
return $this->belongsTo(Teacher::class);
|
||||
}
|
||||
|
||||
public function class() {
|
||||
$this->belongsTo(SchoolClass::class);
|
||||
}
|
||||
|
||||
protected $table = 'tasks';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user