jqh 5 년 전
부모
커밋
6e13c64d60
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Form/Condition.php
  2. 4 0
      src/Grid/Column/Condition.php

+ 2 - 2
src/Form/Condition.php

@@ -96,8 +96,8 @@ class Condition
 
     public function __call($name, $arguments)
     {
-        if (! method_exists($this->form, $name)) {
-            return $this;
+        if ($name == 'if') {
+            return $this->form->if(...$arguments);
         }
 
         return $this->then(function (Form $form) use ($name, &$arguments) {

+ 4 - 0
src/Grid/Column/Condition.php

@@ -122,6 +122,10 @@ class Condition
 
     public function __call($name, $arguments)
     {
+        if ($name == 'if') {
+            return $this->column->if(...$arguments);
+        }
+
         return $this->then(function ($column) use ($name, &$arguments) {
             return $column->$name(...$arguments);
         });