Skip to content

Commit

Permalink
Update UsedByTeams.php
Browse files Browse the repository at this point in the history
it's will be work with Join
  • Loading branch information
Alexmg86 committed Sep 16, 2016
1 parent b7730a0 commit e0c3689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mpociot/Teamwork/Traits/UsedByTeams.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected static function bootUsedByTeams()
static::addGlobalScope('team', function (Builder $builder) {
static::teamGuard();

$builder->where('team_id', auth()->user()->currentTeam->getKey());
$builder->where($builder->getQuery()->from . '.team_id', auth()->user()->currentTeam->getKey());
});

static::saving(function (Model $model) {
Expand Down

0 comments on commit e0c3689

Please sign in to comment.