src/Fractal.php
public function parseFieldsets(array $fieldsets)
    {
        foreach ($fieldsets as $key => $fields) {
            if (is_array($fields)) {
                $fieldsets[$key] = implode(',', $fields);
            }
        }

        $this->fieldsets = array_merge($this->fieldsets, $fieldsets);

        return $this;
    }
public function parseFieldsets(array $fieldsets)
    {
        foreach ($fieldsets as $key => $fields) {
            if (is_array($fields)) {
                $fieldsets[$key] = implode(',', $fields);
            }
        }

        $this->fieldsets = array_merge($this->fieldsets, $fieldsets);

        return $this;
    }
public function parseFieldsets ( array $ fieldsets ) { foreach ( $ fieldsets as $ key => $ fields ) { if ( is_array ( $ fields ) ) { $ fieldsets [ $ key ] = implode ( ',' , $ fields ) ; } } $ this -> fieldsets = array_merge ( $ this -> fieldsets , $ fieldsets ) ; return $ this ; }
Specify the fieldsets to include in the response.

@param array $fieldsets array with key = resourceName and value = fields to include
(array or comma separated string with field names)

@return $this
Specify the fieldsets to include in the response .