You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2018. It is now read-only.
Hey, I have not found a way to bind html input groups.
For example:
I did a little work around but it is not good piece of code :( but you can take a look :)
protected function nameToArray($str) { if (strpos($str,'[') === false) { return $str; } $re = "/(.*?)\\[(.*?)\\]/"; preg_match_all($re, $str, $matches); array_shift($matches); $matches = array_filter(call_user_func_array('array_merge', $matches)); $arr_string = ""; foreach ($matches as $match) { $arr_string .= "['{$match}']"; } return $arr_string; } protected function hasModelValue($name) { if (is_array($this->model)) { $name = $this->nameToArray($name); $arr = $this->model; eval('$isset = isset($arr'.$name.');'); return $isset; } if (! isset($this->model)) { return false; } return isset($this->model->{$name}); } protected function getModelValue($name) { if (is_array($this->model)) { $name = $this->nameToArray($name); $arr = $this->model; eval('$val = $arr'.$name.';'); return $val; } return $this->model->{$name}; }