关于 policy not found 的一点疑问 (bug?)
我在项目中用到policy,但遇到奇怪的Class not found问题…
AuthServiceProvider 中的配对
policies文件夹:
controller中使用:
报错:
疑问:
在 AuthServiceProvider 中,Order模型类对应的是 TestPolicy ,为什么是报找不到 OrderPolicy ??
之前是写 Order 模型类对应的 OrderPolicy 的,但后来换了其他 policy。
是否经过 compiled 后哪里有缓存或定义了 Order 模型类的对应 policy?
推荐文章: