mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
wip
This commit is contained in:
27
app/Cli/Commands/Servers/ServersCreateCommand.php
Normal file
27
app/Cli/Commands/Servers/ServersCreateCommand.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cli\Commands\Servers;
|
||||
|
||||
use App\Cli\Commands\AbstractCommand;
|
||||
use function Laravel\Prompts\select;
|
||||
use function Laravel\Prompts\text;
|
||||
|
||||
class ServersCreateCommand extends AbstractCommand
|
||||
{
|
||||
protected $signature = 'servers:create';
|
||||
|
||||
protected $description = 'Create a new server';
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
$name = text(
|
||||
label: 'What is the server name?',
|
||||
required: true,
|
||||
);
|
||||
$os = select(
|
||||
label: 'What is the server OS?',
|
||||
options: collect(config('core.operating_systems'))
|
||||
->mapWithKeys(fn($value) => [$value => $value]),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user