PHP/Laravel 无法解析 parent Class

PHP/Laravel can not resolve parent Class

使用 php7Laravel 5.5。所有 models 默认在 app/ 文件夹中,Prototype 在 app/ 文件夹。什么都没动

最令人沮丧的是 - 这对 控制器来说一切正常(一切都在它们的默认文件夹中)

我的原型Class:

class Prototype extends Model
{
    //other code
}

我的childClass:

class Tree extends Prototype
{
    //other code
}

Exception: include(/var/www/html/app/Prototypephp): failed to open stream: No such file or directory

我需要帮助来解决这个问题。谢谢!

经过几个小时的工作解决了这个问题,通过将 Prototype Class 移动到其他命名空间(和文件夹)解决了这个问题。为了代码的可读性,对 PrototypeController 做了同样的事情。