Add a --settings-ui option for AppSettingsCommand (#1446)

* Add a --settings-ui option for AppSettingsCommand

Sorry if my code is below par, I don't know php. All this does is allow the APP_ENVIRONMENT_ONLY to be set via an option, which as far as I can tell, isn't currently possible. I've tested this on a local installation and it works.
This commit is contained in:
PiggyPiglet 2019-07-26 23:05:57 +08:00 committed by Dane Everitt
parent 3611ce703b
commit 349114c960

View file

@ -68,7 +68,7 @@ class AppSettingsCommand extends Command
{--redis-host= : Redis host to use for connections.}
{--redis-pass= : Password used to connect to redis.}
{--redis-port= : Port to connect to redis over.}
{--disable-settings-ui}';
{--settings-ui= : Enable or disable the settings UI.}';
/**
* @var array
@ -138,8 +138,8 @@ class AppSettingsCommand extends Command
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
);
if ($this->option('disable-settings-ui')) {
$this->variables['APP_ENVIRONMENT_ONLY'] = 'true';
if (! is_null($this->option('settings-ui'))) {
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true';
} else {
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->confirm(trans('command/messages.environment.app.settings'), true) ? 'false' : 'true';
}