| 1 | <?php | = | 1 | <?php |
| 2 | 2 | |||
| 3 | return [ | 3 | return [ | |
| 4 | 4 | |||
| 5 | /* | 5 | /* | |
| 6 | |-------------------------------------------------------------------------- | 6 | |-------------------------------------------------------------------------- | |
| 7 | | Default Database Connection Name | 7 | | Default Database Connection Name | |
| 8 | |-------------------------------------------------------------------------- | 8 | |-------------------------------------------------------------------------- | |
| 9 | | | 9 | | | |
| 10 | | Here you may specify which of the database connections below you wish | 10 | | Here you may specify which of the database connections below you wish | |
| 11 | | to use as your default connection for all database work. Of course | 11 | | to use as your default connection for all database work. Of course | |
| 12 | | you may use many connections at once using the Database library. | 12 | | you may use many connections at once using the Database library. | |
| 13 | | | 13 | | | |
| 14 | */ | 14 | */ | |
| 15 | 15 | |||
| 16 | 'default' => env('DB_CONNECTION', 'mysql'), | 16 | 'default' => env('DB_CONNECTION', 'mysql'), | |
| 17 | 17 | |||
| 18 | /* | 18 | /* | |
| 19 | |-------------------------------------------------------------------------- | 19 | |-------------------------------------------------------------------------- | |
| 20 | | Database Connections | 20 | | Database Connections | |
| 21 | |-------------------------------------------------------------------------- | 21 | |-------------------------------------------------------------------------- | |
| 22 | | | 22 | | | |
| 23 | | Here are each of the database connections setup for your application. | 23 | | Here are each of the database connections setup for your application. | |
| 24 | | Of course, examples of configuring each database platform that is | 24 | | Of course, examples of configuring each database platform that is | |
| 25 | | supported by Laravel is shown below to make development simple. | 25 | | supported by Laravel is shown below to make development simple. | |
| 26 | | | 26 | | | |
| 27 | | | 27 | | | |
| 28 | | All database work in Laravel is done through the PHP PDO facilities | 28 | | All database work in Laravel is done through the PHP PDO facilities | |
| 29 | | so make sure you have the driver for your particular database of | 29 | | so make sure you have the driver for your particular database of | |
| 30 | | choice installed on your machine before you begin development. | 30 | | choice installed on your machine before you begin development. | |
| 31 | | | 31 | | | |
| 32 | */ | 32 | */ | |
| 33 | 33 | |||
| 34 | 'connections' => [ | 34 | 'connections' => [ | |
| 35 | 35 | |||
| 36 | 'sqlite' => [ | 36 | 'sqlite' => [ | |
| 37 | 'driver' => 'sqlite', | 37 | 'driver' => 'sqlite', | |
| 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), | 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), | |
| 39 | 'prefix' => '', | 39 | 'prefix' => '', | |
| 40 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), | 40 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), | |
| 41 | ], | 41 | ], | |
| 42 | 42 | |||
| 43 | 'mysql' => [ | 43 | 'mysql' => [ | |
| 44 | 'driver' => 'mysql', | 44 | 'driver' => 'mysql', | |
| 45 | 'host' => env('DB_HOST', '127.0.0.1'), | 45 | 'host' => env('DB_HOST', '127.0.0.1'), | |
| 46 | 'port' => env('DB_PORT', '3306'), | 46 | 'port' => env('DB_PORT', '3306'), | |
| 47 | 'database' => env('DB_DATABASE', 'forge'), | 47 | 'database' => env('DB_DATABASE', 'forge'), | |
| 48 | 'username' => env('DB_USERNAME', 'forge'), | 48 | 'username' => env('DB_USERNAME', 'forge'), | |
| 49 | 'password' => env('DB_PASSWORD', ''), | 49 | 'password' => env('DB_PASSWORD', ''), | |
| 50 | 'unix_socket' => env('DB_SOCKET', ''), | 50 | 'unix_socket' => env('DB_SOCKET', ''), | |
| 51 | 'charset' => 'utf8mb4', | 51 | 'charset' => 'utf8mb4', | |
| 52 | 'collation' => 'utf8mb4_unicode_ci', | 52 | 'collation' => 'utf8mb4_unicode_ci', | |
| 53 | 'prefix' => '', | 53 | 'prefix' => '', | |
| 54 | 'prefix_indexes' => true, | 54 | 'prefix_indexes' => true, | |
| 55 | 'strict' => true, | 55 | 'strict' => true, | |
| 56 | 'engine' => null, | 56 | 'engine' => null, | |
| -+ | 57 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ | ||
| 58 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), | |||
| 59 | ]) : [], | |||
| 57 | ], | = | 60 | ], |
| 58 | 61 | |||
| 59 | 'pgsql' => [ | 62 | 'pgsql' => [ | |
| 60 | 'driver' => 'pgsql', | 63 | 'driver' => 'pgsql', | |
| 61 | 'host' => env('DB_HOST', '127.0.0.1'), | 64 | 'host' => env('DB_HOST', '127.0.0.1'), | |
| 62 | 'port' => env('DB_PORT', '5432'), | 65 | 'port' => env('DB_PORT', '5432'), | |
| 63 | 'database' => env('DB_DATABASE', 'forge'), | 66 | 'database' => env('DB_DATABASE', 'forge'), | |
| 64 | 'username' => env('DB_USERNAME', 'forge'), | 67 | 'username' => env('DB_USERNAME', 'forge'), | |
| 65 | 'password' => env('DB_PASSWORD', ''), | 68 | 'password' => env('DB_PASSWORD', ''), | |
| 66 | 'charset' => 'utf8', | 69 | 'charset' => 'utf8', | |
| 67 | 'prefix' => '', | 70 | 'prefix' => '', | |
| 68 | 'prefix_indexes' => true, | 71 | 'prefix_indexes' => true, | |
| 69 | 'schema' => 'public', | 72 | 'schema' => 'public', | |
| 70 | 'sslmode' => 'prefer', | 73 | 'sslmode' => 'prefer', | |
| 71 | ], | 74 | ], | |
| 72 | 75 | |||
| 73 | 'sqlsrv' => [ | 76 | 'sqlsrv' => [ | |
| 74 | 'driver' => 'sqlsrv', | 77 | 'driver' => 'sqlsrv', | |
| 75 | 'host' => env('DB_HOST', 'localhost'), | 78 | 'host' => env('DB_HOST', 'localhost'), | |
| 76 | 'port' => env('DB_PORT', '1433'), | 79 | 'port' => env('DB_PORT', '1433'), | |
| 77 | 'database' => env('DB_DATABASE', 'forge'), | 80 | 'database' => env('DB_DATABASE', 'forge'), | |
| 78 | 'username' => env('DB_USERNAME', 'forge'), | 81 | 'username' => env('DB_USERNAME', 'forge'), | |
| 79 | 'password' => env('DB_PASSWORD', ''), | 82 | 'password' => env('DB_PASSWORD', ''), | |
| 80 | 'charset' => 'utf8', | 83 | 'charset' => 'utf8', | |
| 81 | 'prefix' => '', | 84 | 'prefix' => '', | |
| 82 | 'prefix_indexes' => true, | 85 | 'prefix_indexes' => true, | |
| 83 | ], | 86 | ], | |
| 84 | 87 | |||
| 85 | ], | 88 | ], | |
| 86 | 89 | |||
| 87 | /* | 90 | /* | |
| 88 | |-------------------------------------------------------------------------- | 91 | |-------------------------------------------------------------------------- | |
| 89 | | Migration Repository Table | 92 | | Migration Repository Table | |
| 90 | |-------------------------------------------------------------------------- | 93 | |-------------------------------------------------------------------------- | |
| 91 | | | 94 | | | |
| 92 | | This table keeps track of all the migrations that have already run for | 95 | | This table keeps track of all the migrations that have already run for | |
| 93 | | your application. Using this information, we can determine which of | 96 | | your application. Using this information, we can determine which of | |
| 94 | | the migrations on disk haven't actually been run in the database. | 97 | | the migrations on disk haven't actually been run in the database. | |
| 95 | | | 98 | | | |
| 96 | */ | 99 | */ | |
| 97 | 100 | |||
| 98 | 'migrations' => 'migrations', | 101 | 'migrations' => 'migrations', | |
| 99 | 102 | |||
| 100 | /* | 103 | /* | |
| 101 | |-------------------------------------------------------------------------- | 104 | |-------------------------------------------------------------------------- | |
| 102 | | Redis Databases | 105 | | Redis Databases | |
| 103 | |-------------------------------------------------------------------------- | 106 | |-------------------------------------------------------------------------- | |
| 104 | | | 107 | | | |
| 105 | | Redis is an open source, fast, and advanced key-value store that also | 108 | | Redis is an open source, fast, and advanced key-value store that also | |
| 106 | | provides a richer body of commands than a typical key-value system | 109 | | provides a richer body of commands than a typical key-value system | |
| 107 | | such as APC or Memcached. Laravel makes it easy to dig right in. | 110 | | such as APC or Memcached. Laravel makes it easy to dig right in. | |
| 108 | | | 111 | | | |
| 109 | */ | 112 | */ | |
| 110 | 113 | |||
| 111 | 'redis' => [ | 114 | 'redis' => [ | |
| 112 | 115 | |||
| 113 | 'client' => 'predis', | <> | 116 | 'client' => env('REDIS_CLIENT', 'predis'), |
| 117 | ||||
| 118 | 'options' => [ | |||
| 119 | 'cluster' => env('REDIS_CLUSTER', 'predis'), | |||
| 120 | ], | |||
| 114 | = | 121 | ||
| 115 | 'default' => [ | 122 | 'default' => [ | |
| 116 | 'host' => env('REDIS_HOST', '127.0.0.1'), | 123 | 'host' => env('REDIS_HOST', '127.0.0.1'), | |
| 117 | 'password' => env('REDIS_PASSWORD', null), | 124 | 'password' => env('REDIS_PASSWORD', null), | |
| 118 | 'port' => env('REDIS_PORT', 6379), | 125 | 'port' => env('REDIS_PORT', 6379), | |
| 119 | 'database' => env('REDIS_DB', 0), | 126 | 'database' => env('REDIS_DB', 0), | |
| 120 | ], | 127 | ], | |
| 121 | 128 | |||
| 122 | 'cache' => [ | 129 | 'cache' => [ | |
| 123 | 'host' => env('REDIS_HOST', '127.0.0.1'), | 130 | 'host' => env('REDIS_HOST', '127.0.0.1'), | |
| 124 | 'password' => env('REDIS_PASSWORD', null), | 131 | 'password' => env('REDIS_PASSWORD', null), | |
| 125 | 'port' => env('REDIS_PORT', 6379), | 132 | 'port' => env('REDIS_PORT', 6379), | |
| 126 | 'database' => env('REDIS_CACHE_DB', 1), | 133 | 'database' => env('REDIS_CACHE_DB', 1), | |
| 127 | ], | 134 | ], | |
| 128 | 135 | |||
| 129 | ], | 136 | ], | |
| 130 | 137 | |||
| 131 | ]; | 138 | ]; |