This commit is contained in:
Andras Bacsai
2023-06-16 12:00:36 +02:00
parent c4c2e81701
commit 8daad8f8b8
12 changed files with 78 additions and 30 deletions

View File

@@ -74,9 +74,10 @@ class Server extends BaseModel
{
return $this->hasOne(ServerSetting::class);
}
static public function ownedByCurrentTeam()
static public function ownedByCurrentTeam(array $select = ['*'])
{
return Server::whereTeamId(session('currentTeam')->id);
$selectArray = collect($select)->concat(['id']);
return Server::whereTeamId(session('currentTeam')->id)->with('settings')->select($selectArray->all());
}
static public function validated()