From 3e7c29d264a51c7fb96985e540fda6457b816e22 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Thu, 26 Sep 2024 21:53:34 +0200 Subject: [PATCH] Add artisan command for setting up redis (#580) --- .../Environment/RedisSetupCommand.php | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 app/Console/Commands/Environment/RedisSetupCommand.php diff --git a/app/Console/Commands/Environment/RedisSetupCommand.php b/app/Console/Commands/Environment/RedisSetupCommand.php new file mode 100644 index 000000000..281a97bac --- /dev/null +++ b/app/Console/Commands/Environment/RedisSetupCommand.php @@ -0,0 +1,54 @@ +variables['CACHE_STORE'] = 'redis'; + $this->variables['QUEUE_CONNECTION'] = 'redis'; + $this->variables['SESSION_DRIVERS'] = 'redis'; + + $this->requestRedisSettings(); + + $this->call('p:environment:queue-service', [ + '--overwrite' => true, + ]); + + $this->writeToEnvironment($this->variables); + + $this->info($this->console->output()); + + return 0; + } +}