问题
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