'date', ]; /** * Get the group this student belongs to. */ public function group(): BelongsTo { return $this->belongsTo(Group::class); } /** * Get the sub-group this student belongs to. */ public function subGroup(): BelongsTo { return $this->belongsTo(SubGroup::class); } /** * Get the lessons this student attends. */ public function lessons(): BelongsToMany { return $this->belongsToMany(Lesson::class, 'lesson_student') ->withPivot('attendance', 'score') ->withTimestamps(); } /** * Get the activities this student participates in. */ public function activities(): BelongsToMany { return $this->belongsToMany(Activity::class, 'activity_student') ->withPivot('score', 'notes') ->withTimestamps(); } }