'integer', 'student_id' => 'integer', 'parent_id' => 'integer', 'sent_by' => 'integer', 'sent_at' => 'datetime', ]; public function setSubjectAttribute(?string $value): void { $this->attributes['subject'] = $value !== null ? strip_tags($value) : null; } public function setMessageAttribute(?string $value): void { $this->attributes['message'] = $value !== null ? strip_tags($value) : null; } public function promotion(): BelongsTo { return $this->belongsTo(StudentPromotionRecord::class, 'promotion_id', 'promotion_id'); } public function scopeForPromotion(Builder $q, int $promotionId): Builder { return $q->where('promotion_id', $promotionId); } }