X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FRound.php;h=3c191bc17efb200d65b1263371dec4599d93b508;hb=7691214484ff6130ab0cdc9a1920941711443cea;hp=2232a0e2c95d675411de55c045e7f677217394d0;hpb=df75af8d30ceb44724280829b948dd01e86de07b;p=alttp.git diff --git a/app/Models/Round.php b/app/Models/Round.php index 2232a0e..3c191bc 100644 --- a/app/Models/Round.php +++ b/app/Models/Round.php @@ -57,6 +57,10 @@ class Round extends Model return $this->hasMany(Result::class); } + public function rolled_by_user() { + return $this->belongsTo(User::class, 'rolled_by'); + } + public function tournament() { return $this->belongsTo(Tournament::class); } @@ -65,6 +69,7 @@ class Round extends Model protected $casts = [ 'code' => 'array', 'locked' => 'boolean', + 'no_record' => 'boolean', ]; protected $fillable = [ @@ -73,4 +78,8 @@ class Round extends Model 'tournament_id', ]; + protected $with = [ + 'rolled_by_user', + ]; + }