clear completed TODO
This commit is contained in:
parent
01fc9fc901
commit
568109587c
|
|
@ -12,8 +12,8 @@ use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
class Room extends Model
|
class Room extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
//TODO can a user add rooms?
|
|
||||||
|
|
||||||
public function auditions(): HasMany
|
public function auditions(): HasMany
|
||||||
{
|
{
|
||||||
|
|
@ -34,12 +34,12 @@ class Room extends Model
|
||||||
|
|
||||||
public function users(): BelongsToMany
|
public function users(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(User::class,'room_user');
|
return $this->belongsToMany(User::class, 'room_user');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function judges(): BelongsToMany
|
public function judges(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(User::class,'room_user','room_id','user_id');
|
return $this->belongsToMany(User::class, 'room_user', 'room_id', 'user_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addJudge($userId): void
|
public function addJudge($userId): void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue