public function transform(array $row, $columns, $type = 'printable')
    {
        if ($columns instanceof Collection) {
            return $this->buildColumnByCollection($row, $columns, $type);
        }

        return array_only($row, $columns);
    }
public function transform(array $row, $columns, $type = 'printable')
    {
        if ($columns instanceof Collection) {
            return $this->buildColumnByCollection($row, $columns, $type);
        }

        return array_only($row, $columns);
    }
public function transform ( array $ row , $ columns , $ type = 'printable' ) { if ( $ columns instanceof Collection ) { return $ this -> buildColumnByCollection ( $ row , $ columns , $ type ) ; } return array_only ( $ row , $ columns ) ; }
Transform row data by columns definition.

@param array  $row
@param mixed  $columns
@param string $type
@return array
Transform row data by columns definition .