app同级目录新建config目录
添加配置文件
bootstrap/app.php里面加载
$app->configure('options');
使用
$router->get('/', function () use ($router) {
return config('options.author');
});
来源:oschina
链接:https://my.oschina.net/u/4307541/blog/3270302