Fix model form-binding with array with objects and object with arrays.
This commit is contained in:
1 parent
55eb889aca
commit
e4b32919a3
2 files changed
+13
-8
No files matched your search
+1
-8
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user