2016-07-26 03:32
浏览 109

未找到Laravel 5 Class'Prettus \ Repository \ Providers \ Repository ServiceProvider'

I'm studing about Repository Design Pattern in Laravel and I'm using https://github.com/andersao/l5-repository to do it.

But after I copy/paste folder prettus in my project and add in my config/app.php Prettus\Repository\Providers\RepositoryServiceProvider::class to the end of the providers array I find a problem:

Class 'Prettus\Repository\Providers\Repository ServiceProvider' not found

After that, the project can't run. Please help me.


图片转代码服务由CSDN问答提供 功能建议

我正在研究Laravel中的存储库设计模式,我正在使用 https://github.com/andersao/l5-repository 来做这件事。

但是在我的项目中复制/粘贴文件夹prettus并添加到 config / app.php Prettus \ Repository \ Providers \ RepositoryServiceProvider :: class 之后 提供者数组的结尾我发现了一个问题:

  Class'Prettus \ Repository \ Providers \ Repository ServiceProvider'not found 

之后,项目无法运行。 请帮帮我。


  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongnanman9093 2016-07-26 03:41

    Don't copy/paste the source folder in your project.

    Try following the instructions as stated in the Github documentation:

    composer require prettus/l5-repository

    After the installation finishes you can include the Class in the ServiceProvider array and then you have to publish the configuration:

    php artisan vendor:publish

    打赏 评论

相关推荐 更多相似问题