【发布时间】:2018-09-17 21:12:42
【问题描述】:
我有一些数据作为关系的集合返回:
$item = $this->detailedItems->where('detaileditem_product_id', $productId);
打印出来时,我可以看到我正在寻找的数据,但在尝试访问它时:
$item->detaileditem_id;
或
$item->detaileditem_name;
我收到一个错误:
例外:属性 [detaileditem_id] 在此不存在 集合实例。
【问题讨论】:
标签: php laravel collections eloquent