英文:
Laravel 8 Class App\Helpers\LengthAwareCustomPaginator not found
问题
我有一个Laravel 8项目,在其中我创建了app/Helpers/LengthAwareCustomPaginator类。然后我运行了composer dump-autoload,并期望Laravel能够使用LengthAwareCustomPaginator类。但我收到了以下错误信息:
找不到类App\Helpers\LengthAwareCustomPaginator
请问有人可以告诉我我需要做什么才能使用这个类吗?非常感谢。
英文:
I have a Laravel 8 project where I created app/Helpers/LengthAwareCustomPaginator class. Then I run composer dump-autoload and expected the Laravel will be able to work with LengthAwareCustomPaginator class. But I get an error:
> Class App\Helpers\LengthAwareCustomPaginator not found
Can somebody tell me please what I need to do to be able to use this class? Thanks a lot.
答案1
得分: -3
文件名中有一个拼写错误,导致composer拒绝了它,因为它不符合PSR4标准。
英文:
There was a typo in file name and composer did not accept it cause it did not fit PSR4 standard.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论