“Class not found” error even after dump-autoload?

雨燕双飞 提交于 2019-12-12 04:38:30

问题


I keep getting the "Class not found" error with newly created models. I know the syntax is absolutely correct. I went over it multiple times and I copied and pasted variables to avoid spelling errors.

I also ran

php artisan dump-autoload

mulitple times, but still no luck. This happens in every file, and it only happens to the newly created models.


回答1:


Try using composer instead.

php composer dump-autoload

If you are not generating the models don't forget to add the folder in the composer.json at autoload if it isn't.



来源:https://stackoverflow.com/questions/20834728/class-not-found-error-even-after-dump-autoload

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