Merge branch '5.3' of https://github.com/LaravelCollective/html into blade-directives

This commit is contained in:
Matt Lantz committed 2016-10-21 13:08:42 -04:00
commit da8ed049cf
6 files changed
+35 -13

No files matched your search

+3 -2
View File
@@ -41,7 +41,8 @@ trait FormAccessible
return $this->mutateFormAttribute($key, $value);
}
return $value;
// No form mutator, let the model resolve this
return data_get($this, $key);
}
/**
@@ -54,7 +55,7 @@ trait FormAccessible
$methods = $this->getReflection()->getMethods(ReflectionMethod::IS_PUBLIC);
$mutator = collect($methods)
->first(function ($index, ReflectionMethod $method) use ($key) {
->first(function (ReflectionMethod $method) use ($key) {
return $method->getName() == 'form' . Str::studly($key) . 'Attribute';
});
+1 -1
View File
@@ -1107,7 +1107,7 @@ class FormBuilder
protected function getModelValueAttribute($name)
{
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));
+12
View File
@@ -277,6 +277,18 @@ class HtmlBuilder
return str_replace('@', '@', $this->obfuscate($email));
}
/**
* Generates non-breaking space entities based on number supplied.
*
* @param int $num
*
* @return string
*/
public function nbsp($num = 1)
{
return str_repeat(' ', $num);
}
/**
* Generate an ordered list of items.
*