X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FResult.php;h=e4954195bb3969ceb3be8510f2e085de276b9dcf;hb=a907ef7c6676fef11f42933b2d79bdd496b20122;hp=e693fc7de5d510783d7a0ea24ecfa4d326ce9bc9;hpb=55f2d7cd6c290a0d26db177d54d20c393f890bbb;p=alttp.git diff --git a/app/Models/Result.php b/app/Models/Result.php index e693fc7..e495419 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -17,4 +17,18 @@ class Result extends Model return $this->belongsTo(Participant::class); } + public function getHasFinishedAttribute() { + return $this->time > 0; + } + + protected $appends = [ + 'has_finished', + ]; + + protected $fillable = [ + 'round_id', + 'time', + 'user_id', + ]; + }