This commit is contained in:
Andras Bacsai
2023-06-07 15:08:35 +02:00
parent 50bac2c056
commit bbcabc8e71
31 changed files with 636 additions and 472 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Models;
class PrivateKey extends BaseModel
{
protected $fillable = [
@@ -10,6 +11,10 @@ class PrivateKey extends BaseModel
'private_key',
'team_id',
];
static public function ownedByCurrentTeam()
{
return PrivateKey::whereTeamId(session('currentTeam')->id);
}
public function servers()
{
return $this->hasMany(Server::class);