mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 20:48:09 +08:00
fix: 数据库和缓存配置使用env方式
This commit is contained in:
parent
e8c0a8383b
commit
0d74bb398c
@ -47,5 +47,13 @@ return [
|
||||
// 序列化机制
|
||||
'serialize' => [],
|
||||
],
|
||||
'redis' => [
|
||||
// 驱动方式
|
||||
'type' => 'redis',
|
||||
'host' => env('redis.host','127.0.0.1'),
|
||||
'password' => env('redis.password',''),
|
||||
'select' => env('redis.select',0),
|
||||
'port' => env('redis.port',6379),
|
||||
]
|
||||
],
|
||||
];
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => 'sqlite',
|
||||
'default' => 'mysql',
|
||||
// 自定义时间查询规则
|
||||
'time_query_rule' => [],
|
||||
// 自动写入时间戳字段
|
||||
@ -29,21 +29,21 @@ return [
|
||||
// 数据库类型
|
||||
'type' => 'mysql',
|
||||
// 服务器地址
|
||||
'hostname' => '127.0.0.1',
|
||||
'hostname' => env('mysql.hostname','106.55.25.32'),
|
||||
// 数据库名
|
||||
'database' => 'admin_v6',
|
||||
'database' => env('mysql.database','admin_dv'),
|
||||
// 用户名
|
||||
'username' => 'admin_v6',
|
||||
'username' => env('mysql.username','admin_dv'),
|
||||
// 密码
|
||||
'password' => 'FbYBHcWKr2',
|
||||
'password' => env('mysql.password','3twr7kNZLXeSGtc7'),
|
||||
// 端口
|
||||
'hostport' => '3306',
|
||||
'hostport' => env('mysql.hostport','3306'),
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用 utf8
|
||||
'charset' => 'utf8mb4',
|
||||
// 数据库表前缀
|
||||
'prefix' => '',
|
||||
'prefix' => env('mysql.prefix',''),
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user