self::getCate($value->id,$result,$blank); 这里$value->id,,应该是->cate_order,才合乎逻辑。。
3年前 添加回复 0
把分类表的信息放在$result中 最后返回结果的时候是转换成二维数组,collection::make报了一个错collection方法不存在
[最新 移动用户-3906076 的回答] 我也碰到这问题,不知如何解决?Fatal error: Class 'app\admin\model\Collection' not found in E:\PHPWAMP_IN3\wwwroot\qiye\application\admin\model\Category.php on line 39
时间:5年前
joker
return Collection::make($result) ->toArray();这里会报错,要这样写的话 要引入一下 use think\Collection;或则return collection($result) ->toArray();还有 在模板赋值也报错,报一个对象错误 ;把return 去掉....$this ->view -> assign('cat
6年前 添加回复 7