uuid; if ($database->getMorphClass() === 'App\Models\ServiceDatabase') { $uuid = $database->service->uuid; $server = data_get($database, 'service.server'); } instant_remote_process(["docker rm -f {$uuid}-proxy"], $server); $database->is_public = false; $database->save(); DatabaseStatusChanged::dispatch(); } }