laravel 命令行测试 Uncaught ReflectionException: Class config does not exist
Posted 白桂任的博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了laravel 命令行测试 Uncaught ReflectionException: Class config does not exist相关的知识,希望对你有一定的参考价值。
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); 加载配置
以上是关于laravel 命令行测试 Uncaught ReflectionException: Class config does not exist的主要内容,如果未能解决你的问题,请参考以下文章