Transform the field name when getting the form value from model

This commit is contained in:
Adrian Gunawan committed 2016-05-14 20:50:52 +10:00
1 parent 02c75dff24
commit a3d42da280
1 file changed
+1 -1
+1 -1
View File
@@ -1103,7 +1103,7 @@ class FormBuilder
protected function getModelValueAttribute($name) protected function getModelValueAttribute($name)
{ {
if (method_exists($this->model, 'getFormValue')) { if (method_exists($this->model, 'getFormValue')) {
return $this->model->getFormValue($name); return $this->model->getFormValue($this->transformKey($name));
} }
return data_get($this->model, $this->transformKey($name)); return data_get($this->model, $this->transformKey($name));