Explorar o código

修复表格搜索多个关联表字段sql错误问题

jqh %!s(int64=4) %!d(string=hai) anos
pai
achega
6ac6596c37
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Support/Helper.php

+ 2 - 2
src/Support/Helper.php

@@ -798,8 +798,8 @@ class Helper
         $method = $query === 'orWhere' ? 'orWhere' : 'where';
         $subQuery = $query === 'orWhere' ? 'where' : $query;
 
-        $model->$method(function () use ($model, $column, $subQuery, $params) {
-            static::withRelationQuery($model, $column, $subQuery, $params);
+        $model->$method(function ($q) use ($column, $subQuery, $params) {
+            static::withRelationQuery($q, $column, $subQuery, $params);
         });
     }