argument('node')) ? 'id' : 'uuid'; /** @var \Pterodactyl\Models\Node $node */ $node = Node::query()->where($column, $this->argument('node'))->firstOr(function () { $this->error('The selected node does not exist.'); exit(1); }); $format = $this->option('format'); if (!in_array($format, ['yaml', 'yml', 'json'])) { $this->error('Invalid format specified. Valid options are "yaml" and "json".'); return 1; } if ($format === 'json') { $this->output->write($node->getJsonConfiguration(true)); } else { $this->output->write($node->getYamlConfiguration()); } $this->output->newLine(); return 0; } }