@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // 关联查询 |
160 | 160 | $pk = $this->parent->getPk(); |
161 | 161 | |
162 | - $condition = ['pivot.' . $localKey, '=', $this->parent->$pk]; |
|
162 | + $condition = ['pivot.'.$localKey, '=', $this->parent->$pk]; |
|
163 | 163 | |
164 | 164 | return $this->belongsToManyQuery($foreignKey, $localKey, [$condition]); |
165 | 165 | } |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function wherePivot($field, $op = null, $condition = null) |
296 | 296 | { |
297 | - $this->query->where('pivot.' . $field, $op, $condition); |
|
297 | + $this->query->where('pivot.'.$field, $op, $condition); |
|
298 | 298 | return $this; |
299 | 299 | } |
300 | 300 | |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | if (!empty($range)) { |
324 | 324 | // 查询关联数据 |
325 | 325 | $data = $this->eagerlyManyToMany([ |
326 | - ['pivot.' . $localKey, 'in', $range], |
|
326 | + ['pivot.'.$localKey, 'in', $range], |
|
327 | 327 | ], $relation, $subRelation, $closure); |
328 | 328 | |
329 | 329 | // 关联属性名 |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | $pk = $result->$pk; |
358 | 358 | // 查询管理数据 |
359 | 359 | $data = $this->eagerlyManyToMany([ |
360 | - ['pivot.' . $this->localKey, '=', $pk], |
|
360 | + ['pivot.'.$this->localKey, '=', $pk], |
|
361 | 361 | ], $relation, $subRelation, $closure); |
362 | 362 | |
363 | 363 | // 关联数据封装 |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | } |
395 | 395 | |
396 | 396 | return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ |
397 | - ['pivot.' . $this->localKey, '=', $pk], |
|
397 | + ['pivot.'.$this->localKey, '=', $pk], |
|
398 | 398 | ])->$aggregate($field); |
399 | 399 | } |
400 | 400 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | |
416 | 416 | return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ |
417 | 417 | [ |
418 | - 'pivot.' . $this->localKey, 'exp', new Raw('=' . $this->parent->db(false)->getTable() . '.' . $this->parent->getPk()), |
|
418 | + 'pivot.'.$this->localKey, 'exp', new Raw('='.$this->parent->db(false)->getTable().'.'.$this->parent->getPk()), |
|
419 | 419 | ], |
420 | 420 | ])->fetchSql()->$aggregate($field); |
421 | 421 | } |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | |
494 | 494 | if (empty($this->baseQuery)) { |
495 | 495 | $relationFk = $this->query->getPk(); |
496 | - $query->join([$table => 'pivot'], 'pivot.' . $foreignKey . '=' . $tableName . '.' . $relationFk) |
|
496 | + $query->join([$table => 'pivot'], 'pivot.'.$foreignKey.'='.$tableName.'.'.$relationFk) |
|
497 | 497 | ->where($condition); |
498 | 498 | } |
499 | 499 |