This commit is contained in:
Andras Bacsai 2023-06-16 12:05:52 +02:00
parent 8daad8f8b8
commit 7456fc1ac7

View File

@ -14,10 +14,12 @@ class PrivateKey extends BaseModel
protected $hidden = [
'private_key',
];
static public function ownedByCurrentTeam()
static public function ownedByCurrentTeam(array $select = ['*'])
{
return PrivateKey::whereTeamId(session('currentTeam')->id);
$selectArray = collect($select)->concat(['id']);
return PrivateKey::whereTeamId(session('currentTeam')->id)->where('id', '>', 0)->select($selectArray->all());
}
public function servers()
{
return $this->hasMany(Server::class);