Class 'Monolog\Logger' not found, installation error in Laravel 4

a 夏天 提交于 2020-01-23 01:17:06

问题


I installed Laravel without using composer with typing this command:

C:\wamp\www\travail>laravel new project

It seems that it is on the good way.

Creating application...

Application ready! Build something amazing.

But when I tried to open my project here:

wamp-->localhost-->travail-->project-->public

I got this error:

Class 'Monolog\Logger' not found


回答1:


I solve this issue by doing the following:

  1. Check the minimum-stability value in composer.json and set it to stable:

    "minimum-stability": "stable"
    
  2. Update you composer:

    composer self-update
    
  3. Re-run composer udpate:

    composer update
    

Then run any artisan commands and enjoy coding!




回答2:


According to this thread. Change minimum-stability from dev to stable in composer.json, then run an update. Also try to do a dump-autoload.




回答3:


Finally it works for me after running these two commands:

composer self-update

Then:

composer update --no-scripts



来源:https://stackoverflow.com/questions/22748276/class-monolog-logger-not-found-installation-error-in-laravel-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!