'date', ]; public function candidate() { return $this->belongsTo(Candidate::class); } public function conductor() { return $this->belongsTo(User::class, 'conducted_by'); } public function creator() { return $this->belongsTo(User::class, 'created_by'); } public function getScorePercentageAttribute() { if (!$this->max_score || $this->max_score == 0) { return null; } return round(($this->score / $this->max_score) * 100, 2); } }