Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
olwalkey committed Dec 31, 2024
2 parents 2dfa14e + 2e18753 commit 7650e05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ public function activity(): MorphToMany
public function accessibleServers(): Builder
{
return Server::query()
->select('servers.*')
->select('servers.id', 'servers.name', 'servers.owner_id')
->leftJoin('subusers', 'subusers.server_id', '=', 'servers.id')
->where(function (Builder $builder) {
$builder->where('servers.owner_id', $this->id)->orWhere('subusers.user_id', $this->id);
})
->groupBy('servers.id');
->groupBy('servers.id', 'servers.name', 'servers.owner_id');
}
}

0 comments on commit 7650e05

Please sign in to comment.