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 IlluminateFoundationBootstrapLoadConfiguration)->bootstrap($app); config('any');
使用 (new IlluminateFoundationBootstrapLoadConfiguration)->bootstrap($app); 加载配置