How to install Laravel 4 profiler

可紊 提交于 2019-12-25 06:34:17

问题


I'm a Ubuntu/git/composer noob, and I'm trying to follow the installation instructions here.

After running the php artisan config:publish loic-sharma/profiler command I get the following error:

PHP Fatal error:  Class 'Profiler\ProfilerServiceProvider' not found in /var/www/epcr/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 158

I'm assuming the problem is that I haven't downloaded the code, but I'm not exactly sure how to go about doing that.


回答1:


Most packages require you to manually add service provider in app/config/app.php. There is an array of providers inside. Some providers require also facade alias.

So take a look at documentation, if it is provider, then it should be documented.

e.g.

'Miro\JSONSuite\JSONSuiteServiceProvider'



回答2:


Try running composer dump-autoload




回答3:


I needed to run composer update after I added the require to my composer.json file. After that I had a few permissions I needed to update and it worked after that.



来源:https://stackoverflow.com/questions/21980392/how-to-install-laravel-4-profiler

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