time = $time; $this->forfeit = $forfeit; $this->save(); if ($this->wasChanged()) { ResultChanged::dispatch($this); } } public function updatePlacement($score, $placement) { $this->score = $score; $this->placement = $placement; $this->save(); if ($this->wasChanged()) { ResultChanged::dispatch($this); } } public function round() { return $this->belongsTo(Round::class); } public function participant() { return $this->belongsTo(Participant::class); } public function getHasFinishedAttribute() { return $this->time > 0 || $this->forfeit; } protected $appends = [ 'has_finished', ]; protected $fillable = [ 'forfeit', 'round_id', 'time', 'user_id', ]; }