public function getFieldValue()
    {
        $field_name = $this->field->getAttribute('field_name');

        $oldInput = app('session')->getOldInput($this->getPrefixedFieldName());

        if ($oldInput === null) {
            if ($this->model) {
                $value = $this->model->getAttribute($field_name);

                if ($value !== null) {
                    return $value;
                }
            }

            return $this->field->getAttribute('value');
        }

        return $oldInput;
    }
public function getFieldValue()
    {
        $field_name = $this->field->getAttribute('field_name');

        $oldInput = app('session')->getOldInput($this->getPrefixedFieldName());

        if ($oldInput === null) {
            if ($this->model) {
                $value = $this->model->getAttribute($field_name);

                if ($value !== null) {
                    return $value;
                }
            }

            return $this->field->getAttribute('value');
        }

        return $oldInput;
    }
public function getFieldValue ( ) { $ field_name = $ this -> field -> getAttribute ( 'field_name' ) ; $ oldInput = app ( 'session' ) -> getOldInput ( $ this -> getPrefixedFieldName ( ) ) ; if ( $ oldInput === null ) { if ( $ this -> model ) { $ value = $ this -> model -> getAttribute ( $ field_name ) ; if ( $ value !== null ) { return $ value ; } } return $ this -> field -> getAttribute ( 'value' ) ; } return $ oldInput ; }
Get the field value. Prefills with old input if set, then attempts
to prefill with model. If no inputs found, uses Field default.

@return string
Get the field value . Prefills with old input if set then attempts to prefill with model . If no inputs found uses Field default .