Laravel error - Class setEventDispatcher does not exist

后端 未结 7 1418
猫巷女王i
猫巷女王i 2021-01-18 07:51

Short version

I\'m getting this error, when I run php artisan serve and visit my home page:

ReflectionException (-1)
Class setEventDis         


        
7条回答
  •  春和景丽
    2021-01-18 08:22

    So this is what usually fixes it for me

    1. Reinstall composer dependencies by removing vendor folder and composer.lock. Then run composer clear-cache and then composer install (this is usually the problem)

    2. Check that all service providers are imported correctly in app.php under directory config

    3. Make sure that your service providers are not importing something that does not exist, for example if you register a service provider in production but is only installed as dev:

      if (env('APP_DEBUG')) { $app->register(Barryvdh\Debugbar\LumenServiceProvider::class); }

提交回复
热议问题