We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c81a95 commit 33e7365Copy full SHA for 33e7365
1 file changed
src/Traits/HasTeams.php
@@ -32,7 +32,7 @@ public function ownedTeams(): HasMany
32
*/
33
public function teams(): BelongsToMany
34
{
35
- return $this->belongsToMany(Teams::model('team'), config('teams.tables.team_user'), config('teams.foreign_keys.team_id'), 'user_id')
+ return $this->belongsToMany(Teams::model('team'), Teams::model('membership'), 'user_id', config('teams.foreign_keys.team_id'))
36
->setEagerLoads([])
37
->withPivot('role_id')
38
->withTimestamps()
0 commit comments