Skip to content

Commit 8ee5c60

Browse files
authored
环境变量读取增强 (#236)
1 parent 064b278 commit 8ee5c60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

example/config/config.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
declare(strict_types=1);
44

5+
use function Imi\env;
56
use Imi\Util\Imi;
67

78
return [
@@ -78,7 +79,7 @@
7879
],
7980
// 数组资源配置
8081
'resource' => [
81-
'host' => imiGetEnv('REDIS_SERVER_HOST', '127.0.0.1'),
82+
'host' => env('REDIS_SERVER_HOST', '127.0.0.1'),
8283
'port' => 6379,
8384
// 是否自动序列化变量
8485
'serialize' => false,
@@ -103,7 +104,7 @@
103104
'defaultPool' => 'redis',
104105
'connections' => [
105106
'redis' => [
106-
'host' => imiGetEnv('REDIS_SERVER_HOST', '127.0.0.1'),
107+
'host' => env('REDIS_SERVER_HOST', '127.0.0.1'),
107108
'port' => 6379,
108109
// 是否自动序列化变量
109110
'serialize' => false,

0 commit comments

Comments
 (0)