瀏覽代碼

增加 defaultWidth 函数

Edwin Xu 3 年之前
父節點
當前提交
d9f9070f1e
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      src/Form/Row.php

+ 13 - 0
src/Form/Row.php

@@ -167,6 +167,19 @@ class Row implements Renderable
         return $this->form->model();
     }
 
+    /**
+     * Set default width for field.
+     *
+     * @param  int  $width
+     * @return $this
+     */
+    public function defaultWidth(int $width = 12)
+    {
+        $this->defaultFieldWidth = $width;
+
+        return $this;
+    }
+
     /**
      * Set width for a incomming field.
      *