protected function getFieldItem(Field $field)
    {
        if ($field->hasForeignRelation()) {
            $relation = $field->getForeignRelation();

            return sprintf('$%s', $relation->getSingleName());
        }

        return '$text';
    }
protected function getFieldItem(Field $field)
    {
        if ($field->hasForeignRelation()) {
            $relation = $field->getForeignRelation();

            return sprintf('$%s', $relation->getSingleName());
        }

        return '$text';
    }
protected function getFieldItem ( Field $ field ) { if ( $ field -> hasForeignRelation ( ) ) { $ relation = $ field -> getForeignRelation ( ) ; return sprintf ( '$%s' , $ relation -> getSingleName ( ) ) ; } return '$text' ; }
Gets the fields accessor

@param CrestApps\CodeGeneraotor\Support\Field $field

@return string
Gets the fields accessor