lasthourcloud/app/Models/Server.php
Andras Bacsai da2f657342 wip
2023-03-30 15:52:19 +02:00

24 lines
461 B
PHP

<?php
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);
}
}