this repo has no description
at master 6.9 kB view raw
1<?php 2 3use Illuminate\Support\Str; 4 5return [ 6 7 /* 8 |-------------------------------------------------------------------------- 9 | Default Database Connection Name 10 |-------------------------------------------------------------------------- 11 | 12 | Here you may specify which of the database connections below you wish 13 | to use as your default connection for database operations. This is 14 | the connection which will be utilized unless another connection 15 | is explicitly specified when you execute a query / statement. 16 | 17 */ 18 19 'default' => env('DB_CONNECTION', 'sqlite'), 20 21 /* 22 |-------------------------------------------------------------------------- 23 | Database Connections 24 |-------------------------------------------------------------------------- 25 | 26 | Below are all of the database connections defined for your application. 27 | An example configuration is provided for each database system which 28 | is supported by Laravel. You're free to add / remove connections. 29 | 30 */ 31 32 'connections' => [ 33 34 'sqlite' => [ 35 'driver' => 'sqlite', 36 'url' => env('DB_URL'), 37 'database' => env('DB_DATABASE', database_path('database.sqlite')), 38 'prefix' => '', 39 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 40 'busy_timeout' => null, 41 'journal_mode' => null, 42 'synchronous' => null, 43 'transaction_mode' => 'DEFERRED', 44 ], 45 46 'mysql' => [ 47 'driver' => 'mysql', 48 'url' => env('DB_URL'), 49 'host' => env('DB_HOST', '127.0.0.1'), 50 'port' => env('DB_PORT', '3306'), 51 'database' => env('DB_DATABASE', 'laravel'), 52 'username' => env('DB_USERNAME', 'root'), 53 'password' => env('DB_PASSWORD', ''), 54 'unix_socket' => env('DB_SOCKET', ''), 55 'charset' => env('DB_CHARSET', 'utf8mb4'), 56 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 57 'prefix' => '', 58 'prefix_indexes' => true, 59 'strict' => true, 60 'engine' => null, 61 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 ]) : [], 64 ], 65 66 'mariadb' => [ 67 'driver' => 'mariadb', 68 'url' => env('DB_URL'), 69 'host' => env('DB_HOST', '127.0.0.1'), 70 'port' => env('DB_PORT', '3306'), 71 'database' => env('DB_DATABASE', 'laravel'), 72 'username' => env('DB_USERNAME', 'root'), 73 'password' => env('DB_PASSWORD', ''), 74 'unix_socket' => env('DB_SOCKET', ''), 75 'charset' => env('DB_CHARSET', 'utf8mb4'), 76 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 77 'prefix' => '', 78 'prefix_indexes' => true, 79 'strict' => true, 80 'engine' => null, 81 'options' => extension_loaded('pdo_mysql') ? array_filter([ 82 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 83 ]) : [], 84 ], 85 86 'pgsql' => [ 87 'driver' => 'pgsql', 88 'url' => env('DB_URL'), 89 'host' => env('DB_HOST', '127.0.0.1'), 90 'port' => env('DB_PORT', '5432'), 91 'database' => env('DB_DATABASE', 'laravel'), 92 'username' => env('DB_USERNAME', 'root'), 93 'password' => env('DB_PASSWORD', ''), 94 'charset' => env('DB_CHARSET', 'utf8'), 95 'prefix' => '', 96 'prefix_indexes' => true, 97 'search_path' => 'public', 98 'sslmode' => 'prefer', 99 ], 100 101 'sqlsrv' => [ 102 'driver' => 'sqlsrv', 103 'url' => env('DB_URL'), 104 'host' => env('DB_HOST', 'localhost'), 105 'port' => env('DB_PORT', '1433'), 106 'database' => env('DB_DATABASE', 'laravel'), 107 'username' => env('DB_USERNAME', 'root'), 108 'password' => env('DB_PASSWORD', ''), 109 'charset' => env('DB_CHARSET', 'utf8'), 110 'prefix' => '', 111 'prefix_indexes' => true, 112 // 'encrypt' => env('DB_ENCRYPT', 'yes'), 113 // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 114 ], 115 116 ], 117 118 /* 119 |-------------------------------------------------------------------------- 120 | Migration Repository Table 121 |-------------------------------------------------------------------------- 122 | 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 on the database. 126 | 127 */ 128 129 'migrations' => [ 130 'table' => 'migrations', 131 'update_date_on_publish' => true, 132 ], 133 134 /* 135 |-------------------------------------------------------------------------- 136 | Redis Databases 137 |-------------------------------------------------------------------------- 138 | 139 | Redis is an open source, fast, and advanced key-value store that also 140 | provides a richer body of commands than a typical key-value system 141 | such as Memcached. You may define your connection settings here. 142 | 143 */ 144 145 'redis' => [ 146 147 'client' => env('REDIS_CLIENT', 'phpredis'), 148 149 'options' => [ 150 'cluster' => env('REDIS_CLUSTER', 'redis'), 151 'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'), 152 'persistent' => env('REDIS_PERSISTENT', false), 153 ], 154 155 'default' => [ 156 'url' => env('REDIS_URL'), 157 'host' => env('REDIS_HOST', '127.0.0.1'), 158 'username' => env('REDIS_USERNAME'), 159 'password' => env('REDIS_PASSWORD'), 160 'port' => env('REDIS_PORT', '6379'), 161 'database' => env('REDIS_DB', '0'), 162 'max_retries' => env('REDIS_MAX_RETRIES', 3), 163 'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'), 164 'backoff_base' => env('REDIS_BACKOFF_BASE', 100), 165 'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000), 166 ], 167 168 'cache' => [ 169 'url' => env('REDIS_URL'), 170 'host' => env('REDIS_HOST', '127.0.0.1'), 171 'username' => env('REDIS_USERNAME'), 172 'password' => env('REDIS_PASSWORD'), 173 'port' => env('REDIS_PORT', '6379'), 174 'database' => env('REDIS_CACHE_DB', '1'), 175 'max_retries' => env('REDIS_MAX_RETRIES', 3), 176 'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'), 177 'backoff_base' => env('REDIS_BACKOFF_BASE', 100), 178 'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000), 179 ], 180 181 ], 182 183];