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:
parent
3611ce703b
commit
349114c960
1 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ class AppSettingsCommand extends Command
|
||||||
{--redis-host= : Redis host to use for connections.}
|
{--redis-host= : Redis host to use for connections.}
|
||||||
{--redis-pass= : Password used to connect to redis.}
|
{--redis-pass= : Password used to connect to redis.}
|
||||||
{--redis-port= : Port to connect to redis over.}
|
{--redis-port= : Port to connect to redis over.}
|
||||||
{--disable-settings-ui}';
|
{--settings-ui= : Enable or disable the settings UI.}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
|
@ -138,8 +138,8 @@ class AppSettingsCommand extends Command
|
||||||
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
|
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->option('disable-settings-ui')) {
|
if (! is_null($this->option('settings-ui'))) {
|
||||||
$this->variables['APP_ENVIRONMENT_ONLY'] = 'true';
|
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true';
|
||||||
} else {
|
} else {
|
||||||
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->confirm(trans('command/messages.environment.app.settings'), true) ? 'false' : 'true';
|
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->confirm(trans('command/messages.environment.app.settings'), true) ? 'false' : 'true';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue