소스 검색

Update Utils.php

Shalvah 2 년 전
부모
커밋
7228208564
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Tools/Utils.php

+ 1 - 1
src/Tools/Utils.php

@@ -269,9 +269,9 @@ class Utils
                 $relationChain = explode('.', $relation);
                 $relationVector = array_shift($relationChain);
 
-                $relationModel = get_class((new $modelName())->{$relationVector}()->getModel());
                 $relation = (new $modelName())->{$relationVector}();
                 $relationType = get_class($relation);
+                $relationModel = get_class($relation->getModel());
 
                 $factoryChain = empty($relationChain)
                     ? call_user_func_array([$relationModel, 'factory'], [])