소스 검색

fix findFieldByName

jqh 5 년 전
부모
커밋
24b6ee95ba
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Form/Concerns/HasFiles.php

+ 4 - 0
src/Form/Concerns/HasFiles.php

@@ -53,6 +53,10 @@ trait HasFiles
      */
     public function findFieldByName(?string $column)
     {
+        if ($field = $this->builder->field($column)) {
+            return $field;
+        }
+        
         if (mb_strpos($column, '.')) {
             [$relation, $column] = explode('.', $column);