|
| 1 | +<?php |
| 2 | + |
| 3 | +return [ |
| 4 | + |
| 5 | + /* |
| 6 | + |-------------------------------------------------------------------------- |
| 7 | + | Default Database Connection Name |
| 8 | + |-------------------------------------------------------------------------- |
| 9 | + | |
| 10 | + | By default, the Database library supports only mysql. |
| 11 | + | `pgsql` support will be added soon |
| 12 | + | |
| 13 | + */ |
| 14 | + |
| 15 | + 'default' => env('DB_CONNECTION', 'mysql'), |
| 16 | + |
| 17 | + /* |
| 18 | + |-------------------------------------------------------------------------- |
| 19 | + | Database Connections |
| 20 | + |-------------------------------------------------------------------------- |
| 21 | + | |
| 22 | + | Here are each of the database connections setup for your application. |
| 23 | + | You can connect to multiple database connection, by default it uses |
| 24 | + | the mysql. We added an example reference as `woocommerce`. |
| 25 | + | Just to show you how to setup additional connections. |
| 26 | + | |
| 27 | + | |
| 28 | + | All database is done through the PHP PDO facilities |
| 29 | + | so make sure you have the driver for your particular database of |
| 30 | + | choice installed on your machine before you begin development. |
| 31 | + | |
| 32 | + */ |
| 33 | + |
| 34 | + 'connections' => [ |
| 35 | + |
| 36 | + 'mysql' => [ |
| 37 | + 'driver' => 'mysql', |
| 38 | + 'host' => env('DB_HOST', 'localhost'), |
| 39 | + 'port' => env('DB_PORT', '3306'), |
| 40 | + 'database' => env('DB_DATABASE', 'orm'), |
| 41 | + 'username' => env('DB_USERNAME', 'orm'), |
| 42 | + 'password' => env('DB_PASSWORD', ''), |
| 43 | + 'charset' => 'utf8mb4', |
| 44 | + 'collation' => 'utf8mb4_unicode_ci', |
| 45 | + 'prefix' => env('DB_PREFIX', ''), |
| 46 | + 'prefix_indexes' => env('DB_PREFIX_INDEXES', false), |
| 47 | + ], |
| 48 | + |
| 49 | + |
| 50 | + 'pgsql' => [ |
| 51 | + 'driver' => 'pgsql', |
| 52 | + 'url' => env('DATABASE_URL'), |
| 53 | + 'host' => env('DB_HOST', '127.0.0.1'), |
| 54 | + 'port' => env('DB_PORT', '5432'), |
| 55 | + 'database' => env('DB_DATABASE', 'orm'), |
| 56 | + 'username' => env('DB_USERNAME', 'orm'), |
| 57 | + 'password' => env('DB_PASSWORD', ''), |
| 58 | + 'charset' => 'utf8', |
| 59 | + 'prefix' => '', |
| 60 | + 'prefix_indexes' => true, |
| 61 | + 'search_path' => 'public', |
| 62 | + 'sslmode' => 'prefer', |
| 63 | + ], |
| 64 | + |
| 65 | + 'woocommerce' => [ |
| 66 | + 'driver' => 'mysql', |
| 67 | + 'host' => env('WO_DB_HOST', 'localhost'), |
| 68 | + 'port' => env('WO_DB_PORT', '3306'), |
| 69 | + 'database' => env('WO_DB_DATABASE', 'orm'), |
| 70 | + 'username' => env('WO_DB_USERNAME', 'orm'), |
| 71 | + 'password' => env('WO_DB_PASSWORD', ''), |
| 72 | + 'charset' => 'utf8mb4', |
| 73 | + 'collation' => 'utf8mb4_unicode_ci', |
| 74 | + 'prefix' => env('WO_DB_PREFIX', 'wp_'), |
| 75 | + 'prefix_indexes' => true, |
| 76 | + ], |
| 77 | + ], |
| 78 | + |
| 79 | +]; |
0 commit comments