]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Result.php
show tournament participation in profile
[alttp.git] / app / Models / Result.php
index e5c9f7e77f8b756380275ebdf09854fe64df0555..3ced393cc64b1d13ebe3d2970e399e48550a9c13 100644 (file)
@@ -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',