Skip to content

Commit ddbbd0e

Browse files
gpressutto5taylorotwell
authored andcommitted
Using environment variable to set redis prefix (laravel#5062)
It was the only redis setting that wasn't overridable by an environment variable. It can help if you have multiple instances using the same `APP_NAME`, e.g. a staging instance
1 parent ff15a66 commit ddbbd0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123

124124
'options' => [
125125
'cluster' => env('REDIS_CLUSTER', 'predis'),
126-
'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
126+
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
127127
],
128128

129129
'default' => [

0 commit comments

Comments
 (0)