protected function getValue($attribute) { if (!is_null($value = array_get($this->data, $attribute))) { return $value; } elseif (!is_null($value = array_get($this->files, $attribute))) { return $value; } }