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); 加载配置
原文地址:https://www.cnblogs.com/eleven24/p/10475177.html
时间: 2024-10-29 14:03:03