This commit is contained in:
Andras Bacsai committed 2023-03-30 15:52:19 +02:00
1 parent 7f3e8bdad9
commit da2f657342
15 files changed
+245 -107

No files matched your search

+12
View File
@@ -4,8 +4,20 @@ namespace App\Models;
class Server extends BaseModel
{
protected static function booted()
{
static::created(function ($server) {
ServerSetting::create([
'server_id' => $server->id,
]);
});
}
public function privateKey()
{
return $this->belongsTo(PrivateKey::class);
}
public function settings()
{
return $this->hasOne(ServerSetting::class);
}
}