This commit is contained in:
Andras Bacsai
2023-06-09 15:55:21 +02:00
parent 127d42d873
commit b097842d01
45 changed files with 322 additions and 158 deletions

View File

@@ -62,6 +62,10 @@ class Team extends BaseModel implements SendsDiscord, SendsEmail
}
public function members()
{
return $this->belongsToMany(User::class, 'team_user', 'team_id', 'user_id');
return $this->belongsToMany(User::class, 'team_user', 'team_id', 'user_id')->withPivot('role');
}
public function invitations()
{
return $this->hasMany(TeamInvitation::class);
}
}