public function compileFields($fields)
    {
        $statement = [];

        foreach ($fields as $field) {
            $method = 'compile'.ucfirst($field->type);

            if (method_exists($this, $method)) {
                if (!empty($map = $this->$method($field))) {
                    $statement[$field->name] = $map;
                }
            }
        }

        return $statement;
    }
public function compileFields($fields)
    {
        $statement = [];

        foreach ($fields as $field) {
            $method = 'compile'.ucfirst($field->type);

            if (method_exists($this, $method)) {
                if (!empty($map = $this->$method($field))) {
                    $statement[$field->name] = $map;
                }
            }
        }

        return $statement;
    }
public function compileFields ( $ fields ) { $ statement = [ ] ; foreach ( $ fields as $ field ) { $ method = 'compile' . ucfirst ( $ field -> type ) ; if ( method_exists ( $ this , $ method ) ) { if ( ! empty ( $ map = $ this -> $ method ( $ field ) ) ) { $ statement [ $ field -> name ] = $ map ; } } } return $ statement ; }
Compile an array of fluent fields.

@param $fields

@return array
Compile an array of fluent fields .