Refactor Docker creation in Destination Show.php

This commit is contained in:
Andras Bacsai 2024-03-22 11:34:33 +01:00
parent 8b7e1e4169
commit b25f83e096

View File

@ -26,7 +26,7 @@ public function add($name)
$this->dispatch('error', 'Network already added to this server.');
return;
} else {
$docker = SwarmDocker::create([
SwarmDocker::create([
'name' => $this->server->name . "-" . $name,
'network' => $this->name,
'server_id' => $this->server->id,
@ -38,7 +38,7 @@ public function add($name)
$this->dispatch('error', 'Network already added to this server.');
return;
} else {
$docker = StandaloneDocker::create([
StandaloneDocker::create([
'name' => $this->server->name . "-" . $name,
'network' => $name,
'server_id' => $this->server->id,