3 // REDIS - Split out configuration into an array
4 if (env('REDIS_SERVERS', false)) {
5 $redisServerKeys = ['host', 'port', 'database'];
6 $redisServers = explode(',', trim(env('REDIS_SERVERS', '127.0.0.1:6379:0'), ','));
8 'cluster' => env('REDIS_CLUSTER', false)
10 foreach ($redisServers as $index => $redisServer) {
11 $redisServerName = ($index === 0) ? 'default' : 'redis-server-' . $index;
12 $redisServerDetails = explode(':', $redisServer);
13 if (count($redisServerDetails) < 2) $redisServerDetails[] = '6379';
14 if (count($redisServerDetails) < 3) $redisServerDetails[] = '0';
15 $redisConfig[$redisServerName] = array_combine($redisServerKeys, $redisServerDetails);
22 |--------------------------------------------------------------------------
24 |--------------------------------------------------------------------------
26 | By default, database results will be returned as instances of the PHP
27 | stdClass object; however, you may desire to retrieve records in an
28 | array format for simplicity. Here you can tweak the fetch style.
32 'fetch' => PDO::FETCH_CLASS,
35 |--------------------------------------------------------------------------
36 | Default Database Connection Name
37 |--------------------------------------------------------------------------
39 | Here you may specify which of the database connections below you wish
40 | to use as your default connection for all database work. Of course
41 | you may use many connections at once using the Database library.
45 'default' => env('DB_CONNECTION', 'mysql'),
48 |--------------------------------------------------------------------------
49 | Database Connections
50 |--------------------------------------------------------------------------
52 | Here are each of the database connections setup for your application.
53 | Of course, examples of configuring each database platform that is
54 | supported by Laravel is shown below to make development simple.
57 | All database work in Laravel is done through the PHP PDO facilities
58 | so make sure you have the driver for your particular database of
59 | choice installed on your machine before you begin development.
67 'database' => storage_path('database.sqlite'),
73 'host' => env('DB_HOST', 'localhost'),
74 'database' => env('DB_DATABASE', 'forge'),
75 'username' => env('DB_USERNAME', 'forge'),
76 'password' => env('DB_PASSWORD', ''),
78 'collation' => 'utf8_unicode_ci',
85 'host' => '127.0.0.1',
86 'database' => 'bookstack-test',
87 'username' => env('MYSQL_USER', 'bookstack-test'),
88 'password' => env('MYSQL_PASSWORD', 'bookstack-test'),
90 'collation' => 'utf8_unicode_ci',
97 'host' => env('DB_HOST', 'localhost'),
98 'database' => env('DB_DATABASE', 'forge'),
99 'username' => env('DB_USERNAME', 'forge'),
100 'password' => env('DB_PASSWORD', ''),
103 'schema' => 'public',
107 'driver' => 'sqlsrv',
108 'host' => env('DB_HOST', 'localhost'),
109 'database' => env('DB_DATABASE', 'forge'),
110 'username' => env('DB_USERNAME', 'forge'),
111 'password' => env('DB_PASSWORD', ''),
119 |--------------------------------------------------------------------------
120 | Migration Repository Table
121 |--------------------------------------------------------------------------
123 | This table keeps track of all the migrations that have already run for
124 | your application. Using this information, we can determine which of
125 | the migrations on disk haven't actually been run in the database.
129 'migrations' => 'migrations',
132 |--------------------------------------------------------------------------
134 |--------------------------------------------------------------------------
136 | Redis is an open source, fast, and advanced key-value store that also
137 | provides a richer set of commands than a typical key-value systems
138 | such as APC or Memcached. Laravel makes it easy to dig right in.
142 'redis' => env('REDIS_SERVERS', false) ? $redisConfig : [],