Laravel 8 中找不到类 App\Helpers\LengthAwareCustomPaginator

huangapple go评论61阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年6月19日 19:24:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/76506150.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定