Explorar o código

Feat #207 增加快速创建隐藏字段提交

杨光 %!s(int64=5) %!d(string=hai) anos
pai
achega
7137cb1d2d
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      src/Grid/Tools/QuickCreate.php

+ 12 - 0
src/Grid/Tools/QuickCreate.php

@@ -65,6 +65,18 @@ class QuickCreate implements Renderable
         return $field;
     }
 
+    /**
+     * @param string $column
+     * @param string $placeholder
+     *
+     * @return Text
+     */
+    public function hidden($column, $placeholder = '')
+    {
+        return $this->text($column, $placeholder)
+            ->attribute('hidden', 'hidden');
+    }
+
     /**
      * @param string $column
      * @param string $placeholder