'date', ]; /** * Get the teacher that created this activity. */ public function teacher(): BelongsTo { return $this->belongsTo(Teacher::class); } /** * Get the group for this activity. */ public function group(): BelongsTo { return $this->belongsTo(Group::class); } /** * Get the students participating in this activity. */ public function students(): BelongsToMany { return $this->belongsToMany(Student::class, 'activity_student') ->withPivot('score', 'notes') ->withTimestamps(); } }