dsgm5631 2017-07-02 05:25
浏览 464

运行“php artisan config:cache”后出错

After run php artisan config:cache , show error in

Fatal error: Uncaught ReflectionException: Class config does not exist in D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Container\Container.php:729 Stack trace: #0 D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Container\Container.php(729): ReflectionClass->__construct('config') #1 D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Container\Container.php(608): Illuminate\Container\Container->build('config') #2 D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Container\Container.php(575): Illuminate\Container\Container->resolve('config') #3 D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(728): Illuminate\Container\Container->make('config') #4 D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(106): Illuminate\Foundation\Application->make('config') #5 D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(269): app('config') #6 D:\xampp\htdocs\app\vendor\laravel\framework\src\Ill in D:\xampp\htdocs\app\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 729

I add this Code On bootstrap/app.php

$app->bootstrapWith([
\Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
\Illuminate\Foundation\Bootstrap\LoadConfiguration::class,
\Illuminate\Foundation\Bootstrap\HandleExceptions::class,
\Illuminate\Foundation\Bootstrap\RegisterFacades::class,
\Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
\Illuminate\Foundation\Bootstrap\RegisterProviders::class,
\Illuminate\Foundation\Bootstrap\BootProviders::class,
]);

new Error after added this code :

And run composer dumpautoload -o, it doesn't work

I added this code , it works

$app->bootstrapWith([
\Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
\Illuminate\Foundation\Bootstrap\LoadConfiguration::class,
\Illuminate\Foundation\Bootstrap\HandleExceptions::class,
\Illuminate\Foundation\Bootstrap\RegisterFacades::class,
\Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
\Illuminate\Foundation\Bootstrap\RegisterProviders::class,
\Illuminate\Foundation\Bootstrap\BootProviders::class,
]);

but i use sluggable package and set method to config file , after set command , change sluggable package method array to this :

'method' =>
  Closure::__set_state(array(
)),

Now , my app doesn't work! Because comment this code and work my code ! :(

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制