Merge pull request #206 from Boy132/update-default-drivers

Update default drivers
This commit is contained in:
Charles 2024-05-13 19:14:02 -04:00 committed by GitHub
commit 7bf175190b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 13 deletions

View File

@ -13,12 +13,8 @@ LOG_LEVEL=debug
DB_CONNECTION=sqlite DB_CONNECTION=sqlite
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
CACHE_STORE=file CACHE_STORE=file
QUEUE_CONNECTION=sync QUEUE_CONNECTION=database
SESSION_DRIVER=file SESSION_DRIVER=file
HASHIDS_SALT= HASHIDS_SALT=

View File

@ -11,23 +11,20 @@ class AppSettingsCommand extends Command
{ {
use EnvironmentWriterTrait; use EnvironmentWriterTrait;
public const CACHE_DRIVERS = [ public const CACHE_DRIVERS = [
'redis' => 'Redis',
'memcached' => 'Memcached',
'file' => 'Filesystem (recommended)', 'file' => 'Filesystem (recommended)',
'redis' => 'Redis',
]; ];
public const SESSION_DRIVERS = [ public const SESSION_DRIVERS = [
'redis' => 'Redis',
'memcached' => 'Memcached',
'database' => 'MySQL Database',
'file' => 'Filesystem (recommended)', 'file' => 'Filesystem (recommended)',
'redis' => 'Redis',
'database' => 'MySQL Database',
'cookie' => 'Cookie', 'cookie' => 'Cookie',
]; ];
public const QUEUE_DRIVERS = [ public const QUEUE_DRIVERS = [
'database' => 'MySQL Database (recommended)',
'redis' => 'Redis', 'redis' => 'Redis',
'database' => 'MySQL Database',
'sync' => 'Sync (recommended)',
]; ];
protected $description = 'Configure basic environment settings for the Panel.'; protected $description = 'Configure basic environment settings for the Panel.';
@ -86,7 +83,7 @@ class AppSettingsCommand extends Command
array_key_exists($selected, self::SESSION_DRIVERS) ? $selected : null array_key_exists($selected, self::SESSION_DRIVERS) ? $selected : null
); );
$selected = config('queue.default', 'sync'); $selected = config('queue.default', 'database');
$this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice( $this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice(
'Queue Driver', 'Queue Driver',
self::QUEUE_DRIVERS, self::QUEUE_DRIVERS,