浏览代码

笛卡尔积

kphcdr 1 年之前
父节点
当前提交
d4a2628a29
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Modules/Admin/Services/SpecService.php

+ 1 - 1
app/Modules/Admin/Services/SpecService.php

@@ -96,7 +96,7 @@ class SpecService extends BaseService
      */
     public function cartesian(array $specIdArr)
     {
-        $specS = Spec::whereIn("id", $specIdArr)->get();
+        $specS = Spec::with("attrs")->whereIn("id", $specIdArr)->get();
 
         $attrS = collect();
         $cartesianProduct = new CartesianProduct();