例如 Product 表关联了 ProductReview, 在获取products的时候,是否能顺带获取每个product的reviews呢
$filter = [
'numPerPage' => $this->numPerPage,
'pageNum' => $this->pageNum,
'orderBy' => $this->orderBy,
'where' => [
['customer_id' => $customer_id]
],
'asArray' => true,
];
$customer_store_list = Yii::$service->customer->product->coll($filter);
看了Yii的文档,不确定能不能用Yii的书写一个get方法比如 getReviews() 来实现, 谢谢。