src/Commands/Command.php
protected function getFieldsFromRequest($prefix = null)
    {
        if (Request::has('fields')) {
            $prefix = $prefix ? $prefix . '.' : '';

            return array_map(function($field) use ($prefix) {
                return $prefix . snake_case($field);
            }, explode(',', Request::get('fields')));
        }

        return ['*'];
    }
protected function getFieldsFromRequest($prefix = null)
    {
        if (Request::has('fields')) {
            $prefix = $prefix ? $prefix . '.' : '';

            return array_map(function($field) use ($prefix) {
                return $prefix . snake_case($field);
            }, explode(',', Request::get('fields')));
        }

        return ['*'];
    }
This method returns an array of fields parsed from the request. `[*]` is returned by default (all fields).
Fields can be written in snake_case or camelCase. They are converted to snake_case automatically.

Example: `?fields=column1,column2` is returned as `['column1', 'column2']`

@return array