Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -49,11 +49,11 @@ trait FormAccessible
|
||||
unset($keys[0]);
|
||||
$key = implode('.', $keys);
|
||||
|
||||
if ($this->hasFormMutator($key)) {
|
||||
if (method_exists($relatedModel, 'hasFormMutator') && $key !== '' && $relatedModel->hasFormMutator($key)) {
|
||||
return $relatedModel->getFormValue($key);
|
||||
}
|
||||
|
||||
return data_get($relatedModel, $key);
|
||||
return data_get($relatedModel, empty($key)? null: $key);
|
||||
}
|
||||
|
||||
// No form mutator, let the model resolve this
|
||||
@@ -81,7 +81,7 @@ trait FormAccessible
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasFormMutator($key)
|
||||
public function hasFormMutator($key)
|
||||
{
|
||||
$methods = $this->getReflection()->getMethods(ReflectionMethod::IS_PUBLIC);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user