Model can now resolve this for us

This commit is contained in:
Samuel Georges 2015-03-07 12:28:50 +11:00
parent 9ff62d02b7
commit 8c41bc181e
1 changed files with 1 additions and 8 deletions

View File

@ -125,15 +125,8 @@ abstract class FormWidgetBase extends WidgetBase
*/
public function resolveModelAttribute($attribute)
{
$model = $this->model;
$parts = Str::evalHtmlArray($attribute);
$last = array_pop($parts);
foreach ($parts as $part) {
$model = $model->{$part};
}
return [$model, $last];
return $this->model->resolveAttribute($parts);
}
}