lumen 添加配置

app同级目录新建config目录

添加配置文件

 

 

 

 

bootstrap/app.php里面加载

 

$app->configure('options');

使用
$router->get('/', function () use ($router) {
return config('options.author');
});
posted @ 2020-04-16 15:54  brady-wang  阅读(488)  评论(0编辑  收藏  举报