if (!
$input->
getOption('force'
) &&
file_exists($this->projectDir . '/.env'
)) { $io->
comment('Instance has already been set-up. To start over, please delete your .env file.'
);
return Command::SUCCESS;
} if (!
$input->
isInteractive()) { $this->
generateJwt($input,
$io);
$key = Key::
createNewRandomKey();
$env['APP_SECRET'
] =
$key->
saveToAsciiSafeString();
$env['INSTANCE_ID'
] =
$this->
generateInstanceId();
$this->
createEnvFile($input,
$io,
$env);
return Command::SUCCESS;
} $io->
section('Application information'
);
$env['APP_ENV'
] =
$io->
choice('Application environment',
['prod', 'dev'
],
$input->
getOption('app-env'
));
// TODO: optionally check http connection (create test file in public and request)
$env['APP_URL'
] =
$io->
ask('URL to your /public folder',
$input->
getOption('app-url'
),
static function Dstring
$value): string
{