Explorar o código

Form\Row增加 getKey 以及 model 方法

jqh %!s(int64=4) %!d(string=hai) anos
pai
achega
f4a9deeb07
Modificáronse 1 ficheiros con 16 adicións e 1 borrados
  1. 16 1
      src/Form/Row.php

+ 16 - 1
src/Form/Row.php

@@ -46,7 +46,6 @@ use Illuminate\Contracts\Support\Renderable;
  * @method Field\Embeds                 embeds($column, $label = '')
  * @method Field\Captcha                captcha()
  * @method Field\Listbox                listbox($column, $label = '')
- * @method Field\SelectResource         selectResource($column, $label = '')
  * @method Field\File                   file($column, $label = '')
  * @method Field\Image                  image($column, $label = '')
  * @method Field\MultipleFile           multipleFile($column, $label = '')
@@ -116,6 +115,22 @@ class Row implements Renderable
         return $this->fields;
     }
 
+    /**
+     * @return mixed
+     */
+    public function getKey()
+    {
+        return $this->form->getKey();
+    }
+
+    /**
+     * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Support\Fluent|void
+     */
+    public function model()
+    {
+        return $this->form->model();
+    }
+
     /**
      * Set width for a incomming field.
      *