假设我配置有如下
官网会自动读取没有子目录的配置文件
<?php
return [
'host' => env('elasticsearch.host', ['https://localhost:9200']),
'rew' => 'nihao'
];
要使用的时候需要如下
$res = \think\facade\Config::load('es/config','es');
dd(config('es.rew'));
假设我配置有如下
官网会自动读取没有子目录的配置文件
<?php
return [
'host' => env('elasticsearch.host', ['https://localhost:9200']),
'rew' => 'nihao'
];
要使用的时候需要如下
$res = \think\facade\Config::load('es/config','es');
dd(config('es.rew'));