Closed Alexmg86 closed 7 years ago
i change trait UsedByTeams static::addGlobalScope('team', function (Builder $builder) { static::teamGuard(); $builder->where($builder->getQuery()->from . '.team_id', auth()->user()->currentTeam->getKey()); });
Could you provide a pull request with that modification?
Hi! How i can use teamwork, if i need Join in query?
Laravel ask me error: "SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'team_id' in where clause is ambiguous (SQL: select
tasks
.*,price_types
.name
asname_type
fromtasks
inner joinprice_types
ontasks
.type_list
=price_types
.id
whereproject_id
= 9 andteam_id
= 1 order byid
asc)"