Merge pull request #33 from garygreen/fix-model-bindings

Fix model form-binding with array with objects and object with arrays.
This commit is contained in:
Tom committed 2015-05-06 08:48:56 -07:00
commit a0a763779d
2 files changed
+13 -8

No files matched your search

+1 -8
View File
@@ -935,14 +935,7 @@ class FormBuilder {
*/
protected function getModelValueAttribute($name)
{
if (is_object($this->model))
{
return object_get($this->model, $this->transformKey($name));
}
elseif (is_array($this->model))
{
return array_get($this->model, $this->transformKey($name));
}
return data_get($this->model, $this->transformKey($name));
}
/**