public function transform()
    {
        if( ! $this->transformer) {
            return [];
        }

        $presentation = $this->transformer->transform($this->resource);

        return $this->transformToArray($presentation);
    }
public function transform()
    {
        if( ! $this->transformer) {
            return [];
        }

        $presentation = $this->transformer->transform($this->resource);

        return $this->transformToArray($presentation);
    }
public function transform ( ) { if ( ! $ this -> transformer ) { return [ ] ; } $ presentation = $ this -> transformer -> transform ( $ this -> resource ) ; return $ this -> transformToArray ( $ presentation ) ; }
Present the item using a transformer.

@return array
Present the item using a transformer .