database command fixes

This commit is contained in:
Dane Everitt 2017-11-04 17:41:52 -05:00
parent cf41060531
commit 799b8a7f5f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 7 additions and 4 deletions

View file

@ -11,7 +11,7 @@ DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=panel
DB_USERNAME=pterodactyl
DB_PASSWORD=secret
DB_PASSWORD=
CACHE_DRIVER=redis
SESSION_DRIVER=database

View file

@ -45,7 +45,10 @@ class DatabaseSettingsCommand extends Command
*/
protected $signature = 'p:environment:database
{--host= : The connection address for the MySQL server.}
{--port= : The connection port for the MySQL server.}';
{--port= : The connection port for the MySQL server.}
{--database= : The database to use.}
{--username= : Username to use when connecting.}
{--password= : Password to use for this database.}';
/**
* @var array
@ -86,12 +89,12 @@ class DatabaseSettingsCommand extends Command
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
);
$this->variables['DB_DATABASE'] = $this->option('port') ?? $this->ask(
$this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask(
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
);
$this->output->note(trans('command/messages.environment.database.username_warning'));
$this->variables['DB_USERNAME'] = $this->option('port') ?? $this->ask(
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
);