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 WPF使用Canvas绘制矢量图问题
    • ¥15 用三极管设计一个单管共射放大电路
    • ¥15 孟德尔随机化r语言运行问题
    • ¥15 pyinstaller编译的时候出现No module named 'imp'
    • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
    • ¥15 怎么把多于硬盘空间放到根目录下
    • ¥15 Matlab问题解答有两个问题
    • ¥15 LCD12864中文显示
    • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
    • ¥15 gsoap生成onvif框架