@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | private static function getKeyChain(Relation $relation, string $cacheKey) : array |
229 | 229 | { |
230 | 230 | $fields = self::$fieldOrderCache[$cacheKey]; |
231 | - $getter = function () use ($fields) { |
|
231 | + $getter = function () use ($fields) { |
|
232 | 232 | $carry = []; |
233 | 233 | foreach ($fields as $item) { |
234 | 234 | $v = $this->{$item}; |
@@ -246,8 +246,8 @@ discard block |
||
246 | 246 | |
247 | 247 | private static $fieldOrderCache = [ |
248 | 248 | 'BelongsTo' => ['ownerKey', 'foreignKey'], |
249 | - 'BelongsToMany' => ['parentKey','foreignPivotKey','relatedPivotKey','relatedKey'], |
|
250 | - 'HasOneOrMany' => ['localKey', 'foreignKey' ], |
|
249 | + 'BelongsToMany' => ['parentKey', 'foreignPivotKey', 'relatedPivotKey', 'relatedKey'], |
|
250 | + 'HasOneOrMany' => ['localKey', 'foreignKey'], |
|
251 | 251 | 'HasManyThrough' => ['localKey', 'firstKey', 'secondLocalKey', 'secondKey'], |
252 | 252 | |
253 | 253 | ]; |