X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FResult.php;h=3ced393cc64b1d13ebe3d2970e399e48550a9c13;hb=eebc6384e56336b66ec250fc2aea3be6171d53ff;hp=e5c9f7e77f8b756380275ebdf09854fe64df0555;hpb=d748feb96453d74aeffec648d6f5f68d9ef3b520;p=alttp.git diff --git a/app/Models/Result.php b/app/Models/Result.php index e5c9f7e..3ced393 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -17,7 +17,16 @@ class Result extends Model 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',