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的主要内容,如果未能解决你的问题,请参考以下文章

Laravel Composer 错误 Uncaught ReflectionException: Class log does not exist in Container.php:738

Laravel 5 Uncaught SyntaxError:无效或意外令牌(红点)

Uncaught ReferenceError: $ is not defined - Laravel 5.5 + Laravel Mix

iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', re

Laravel 5.1 和 Vue.js - 21678 Uncaught (in promise) TypeError: Cannot read property 'data' of null

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'fingerprint') Laravel Live