lasthourcloud/app/Models/PrivateKey.php
Andras Bacsai bbcabc8e71 woah
2023-06-07 15:08:35 +02:00

23 lines
402 B
PHP

<?php
namespace App\Models;
class PrivateKey extends BaseModel
{
protected $fillable = [
'name',
'description',
'private_key',
'team_id',
];
static public function ownedByCurrentTeam()
{
return PrivateKey::whereTeamId(session('currentTeam')->id);
}
public function servers()
{
return $this->hasMany(Server::class);
}
}