模型关联

浏览:247 发布日期:2019/10/29 分类:求助交流
第一种写法$product = self::with('imgs.imgUrl,properties')
->find($id);

第二种写法 $product=self::with(['imgs.imgUrl'])
->with(['properties'])
->find($id);
第二种写法为什么会报错呢,imgUrl的数据加载不出来,求大神指教
最佳答案
评论( 相关
后面还有条评论,点击查看>>