webman迁移-优化

This commit is contained in:
2026-03-18 15:10:40 +08:00
parent ea77c7b3a1
commit e2ae55319e
70 changed files with 1278 additions and 137 deletions

View File

@@ -1,14 +1,23 @@
<?php
return [
$env = function (string $dotKey, $default = null) {
$upperKey = strtoupper(str_replace('.', '_', $dotKey));
$value = env($dotKey, null);
if ($value === null) {
$value = env($upperKey, $default);
}
return $value ?? $default;
};
return [
'default' => 'mysql',
'connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => '127.0.0.1',
'port' => '3306',
'database' => env('DATABASE_DATABASE', 'dafuweng-buildadmin'),
'username' => env('DATABASE_USERNAME', 'dafuweng-buildadmin'),
'password' => env('DATABASE_PASSWORD', '123456'),
'host' => $env('database.hostname', '127.0.0.1'),
'port' => $env('database.hostport', '3306'),
'database' => $env('database.database', 'dafuweng-buildadmin'),
'username' => $env('database.username', 'dafuweng-buildadmin'),
'password' => $env('database.password', '123456'),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_general_ci',
'prefix' => '',