Getting data for a form from a relation (#472)

This commit is contained in:
Vendin authored and Tom Shafer committed 2018-02-05 07:58:09 -07:00
1 parent cecb65626c
commit e1318fcfdd
2 files changed
+15 -2

No files matched your search

+2 -2
View File
@@ -49,7 +49,7 @@ trait FormAccessible
unset($keys[0]);
$key = implode('.', $keys);
if ($this->hasFormMutator($key)) {
if (method_exists($relatedModel, 'hasFormMutator') && $relatedModel->hasFormMutator($key)) {
return $relatedModel->getFormValue($key);
}
@@ -81,7 +81,7 @@ trait FormAccessible
*
* @return bool
*/
protected function hasFormMutator($key)
public function hasFormMutator($key)
{
$methods = $this->getReflection()->getMethods(ReflectionMethod::IS_PUBLIC);