protected function getFieldItemAccessor(Field $field)
    {
        if ($field->hasForeignRelation()) {
            $relation = $field->getForeignRelation();
            return sprintf('$%s->%s', $relation->getSingleName(), $relation->getField());
        }

        return '$text';
    }
protected function getFieldItemAccessor(Field $field)
    {
        if ($field->hasForeignRelation()) {
            $relation = $field->getForeignRelation();
            return sprintf('$%s->%s', $relation->getSingleName(), $relation->getField());
        }

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

@param CrestApps\CodeGeneraotor\Support\Field $field

@return string
Gets the fields item accessor