mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
fix: 更新公共配置文件格式
This commit is contained in:
parent
836d327971
commit
a2e7318104
@ -1,16 +1,21 @@
|
||||
[db]
|
||||
# 数据库类型
|
||||
type=sqlite
|
||||
|
||||
[mysql]
|
||||
hostname=127.0.0.1
|
||||
hostport=3306
|
||||
database=thinkadmin
|
||||
username=root
|
||||
password=
|
||||
prefix=
|
||||
# MySQL 数据库配置
|
||||
mysql_hostname=127.0.0.1
|
||||
mysql_hostport=3306
|
||||
mysql_database=thinkadmin
|
||||
mysql_username=root
|
||||
mysql_password=
|
||||
mysql_prefix=
|
||||
|
||||
[redis]
|
||||
host=127.0.0.1
|
||||
port=6379
|
||||
password=
|
||||
select=0
|
||||
[cache]
|
||||
# 缓存类型
|
||||
type=file
|
||||
|
||||
# Redis 缓存服务配置
|
||||
redis_hostname=127.0.0.1
|
||||
redis_hostport=6379
|
||||
redis_password=
|
||||
redis_select=0
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
return [
|
||||
// 默认缓存驱动
|
||||
'default' => 'file',
|
||||
'default' => env('cache.type', 'file'),
|
||||
// 缓存连接配置
|
||||
'stores' => [
|
||||
'file' => [
|
||||
@ -50,10 +50,10 @@ return [
|
||||
'redis' => [
|
||||
// 驱动方式
|
||||
'type' => 'redis',
|
||||
'host' => env('redis.host', '127.0.0.1'),
|
||||
'port' => env('redis.port', 6379),
|
||||
'select' => env('redis.select', 0),
|
||||
'password' => env('redis.password', ''),
|
||||
'host' => env('cache.redis_hostname', '127.0.0.1'),
|
||||
'port' => env('cache.redis_hostport', 6379),
|
||||
'password' => env('cache.redis_password', ''),
|
||||
'select' => env('cache.redis_select', 0),
|
||||
]
|
||||
],
|
||||
];
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => env('db.type', 'sqlite'),
|
||||
'default' => env('type.db_type', 'sqlite'),
|
||||
// 自定义时间查询规则
|
||||
'time_query_rule' => [],
|
||||
// 自动写入时间戳字段
|
||||
@ -29,15 +29,15 @@ return [
|
||||
// 数据库类型
|
||||
'type' => 'mysql',
|
||||
// 服务器地址
|
||||
'hostname' => env('mysql.hostname', '127.0.0.1'),
|
||||
'hostname' => env('db.mysql_hostname', '127.0.0.1'),
|
||||
// 数据库名
|
||||
'database' => env('mysql.database', 'thinkadmin'),
|
||||
'database' => env('db.mysql_database', 'thinkadmin'),
|
||||
// 用户名
|
||||
'username' => env('mysql.username', 'root'),
|
||||
'username' => env('db.mysql_username', 'root'),
|
||||
// 密码
|
||||
'password' => env('mysql.password', ''),
|
||||
'password' => env('db.mysql_password', ''),
|
||||
// 端口
|
||||
'hostport' => env('mysql.hostport', '3306'),
|
||||
'hostport' => env('db.mysql_hostport', '3306'),
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用 utf8
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user