l5-repository 问题?

Target [App\Repositories\UserRepository] is not instantiable while building [App\Http\Controllers\UsersController]
安装.prettus/l5-repository之后按正常操作进行,在请求接口,报错
/**

  • UsersController constructor.
  • @param UserRepository $repository
  • @param UserValidator $validator
    */
    public function __construct(UserRepository $repository, UserValidator $validator)
    {
    $this->repository = $repository;
    $this->validator = $validator;
    }
    ???
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 2

请问这个最后是如何解决的?

3年前 评论

服务没有注册导致的,你注册下RepositoryService就好了

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!