require __DIR__ . '/vendor/autoload.php';$app = require_once __DIR__ . '/bootstrap/app.php';config('any');
解决办法:
require __DIR__ . '/vendor/autoload.php';$app = require_once __DIR__ . '/bootstrap/app.php';(new \Illuminate\Foundation\Bootstrap\LoadConfiguration)->bootstrap($app);config('any');
使用 (new \Illuminate\Foundation\Bootstrap\LoadConfiguration)->bootstrap($app); 加载配置