1
0
mirror of https://github.com/robonen/education-project.git synced 2026-03-20 02:44:31 +00:00

Модуль Задания

This commit is contained in:
ashen-1-dev
2020-12-10 21:14:51 +07:00
parent ba578e9fdf
commit dda49ceb17
23 changed files with 219 additions and 94 deletions

View File

@@ -8,10 +8,10 @@ use Illuminate\Database\Eloquent\Model;
class Task extends Model
{
use HasFactory;
protected $fillable = ['name', 'description', 'deadline', 'teacher_id', 'subject_id'];
protected $fillable = ['banktask_id', 'deadline', 'teacher_id', 'class_id'];
public function banktask() {
return $this->hasMany(BankTask::class, 'class_task');
return $this->belongsTo(BankTask::class);
}
public function teacher(){