protected function processJSONFields($file)
    {
        $json = File::get($file);
        $fields = json_decode($json);

        $fieldsString = '';
        foreach ($fields->fields as $field) {
            if ($field->type === 'select' || $field->type === 'enum') {
                $fieldsString .= $field->name . '#' . $field->type . '#options=' . json_encode($field->options) . ';';
            } else {
                $fieldsString .= $field->name . '#' . $field->type . ';';
            }
        }

        $fieldsString = rtrim($fieldsString, ';');

        return $fieldsString;
    }
protected function processJSONFields($file)
    {
        $json = File::get($file);
        $fields = json_decode($json);

        $fieldsString = '';
        foreach ($fields->fields as $field) {
            if ($field->type === 'select' || $field->type === 'enum') {
                $fieldsString .= $field->name . '#' . $field->type . '#options=' . json_encode($field->options) . ';';
            } else {
                $fieldsString .= $field->name . '#' . $field->type . ';';
            }
        }

        $fieldsString = rtrim($fieldsString, ';');

        return $fieldsString;
    }
protected function processJSONFields ( $ file ) { $ json = File :: get ( $ file ) ; $ fields = json_decode ( $ json ) ; $ fieldsString = '' ; foreach ( $ fields -> fields as $ field ) { if ( $ field -> type === 'select' || $ field -> type === 'enum' ) { $ fieldsString .= $ field -> name . '#' . $ field -> type . '#options=' . json_encode ( $ field -> options ) . ';' ; } else { $ fieldsString .= $ field -> name . '#' . $ field -> type . ';' ; } } $ fieldsString = rtrim ( $ fieldsString , ';' ) ; return $ fieldsString ; }
Process the JSON Fields.

@param  string $file

@return string
Process the JSON Fields .