moving to provider stored in database
This commit is contained in:
@@ -20,7 +20,6 @@ class Server extends Model
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'provider' => ServerProvider::class,
|
||||
'status' => ServerStatus::class,
|
||||
];
|
||||
}
|
||||
@@ -66,6 +65,11 @@ class Server extends Model
|
||||
return $this->hasMany(FirewallRule::class);
|
||||
}
|
||||
|
||||
public function provider(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Provider::class);
|
||||
}
|
||||
|
||||
public function sshClient(string $user = 'root'): Ssh
|
||||
{
|
||||
return Ssh::create($user, $this->ipv4)
|
||||
|
||||
Reference in New Issue
Block a user