diff --git a/config/database.php b/config/database.php index 1a1c4d68..0fe4ac68 100644 --- a/config/database.php +++ b/config/database.php @@ -37,12 +37,18 @@ 'sqlite' => [ 'driver' => 'sqlite', + 'url' => env('DB_URL'), 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => env('DB_PREFIX', ''), + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + 'busy_timeout' => null, + 'journal_mode' => null, + 'synchronous' => null, ], 'mysql' => [ 'driver' => 'mysql', + 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', 3306), 'database' => env('DB_DATABASE', 'forge'), @@ -52,9 +58,34 @@ 'charset' => env('DB_CHARSET', 'utf8mb4'), 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 'prefix' => env('DB_PREFIX', ''), + 'prefix_indexes' => env('DB_PREFIX_INDEXES', true), 'strict' => env('DB_STRICT_MODE', true), 'engine' => env('DB_ENGINE'), 'timezone' => env('DB_TIMEZONE', '+00:00'), + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'mariadb' => [ + 'driver' => 'mariadb', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => env('DB_CHARSET', 'utf8mb4'), + 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), + 'prefix' => env('DB_PREFIX', ''), + 'prefix_indexes' => env('DB_PREFIX_INDEXES', true), + 'strict' => env('DB_STRICT_MODE', true), + 'engine' => env('DB_ENGINE'), + 'timezone' => env('DB_TIMEZONE', '+00:00'), + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], ], 'pgsql' => [ @@ -66,12 +97,14 @@ 'password' => env('DB_PASSWORD', ''), 'charset' => env('DB_CHARSET', 'utf8'), 'prefix' => env('DB_PREFIX', ''), + 'prefix_indexes' => env('DB_PREFIX_INDEXES', true), 'search_path' => env('DB_SCHEMA', 'public'), 'sslmode' => env('DB_SSL_MODE', 'prefer'), ], 'sqlsrv' => [ 'driver' => 'sqlsrv', + 'url' => env('DB_URL'), 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', 1433), 'database' => env('DB_DATABASE', 'forge'), @@ -79,6 +112,9 @@ 'password' => env('DB_PASSWORD', ''), 'charset' => env('DB_CHARSET', 'utf8'), 'prefix' => env('DB_PREFIX', ''), + 'prefix_indexes' => env('DB_PREFIX_INDEXES', true), + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), ], ],