public function parseOnTableColumns($item, array &$outputRow)
    {
        if (method_exists($item, 'presenter')) {
            $item = $item->presenter();
        }

        $columns         = $this->columnFactory->getColumns();
        $includedColumns = $this->columnFactory->getIncludedColumns($this->fieldFactory->getEditFields());
        $relatedColumns  = $this->columnFactory->getRelatedColumns();

        //loop over both the included and related columns
        foreach (array_merge($includedColumns, $relatedColumns) as $field => $col) {
            //            $attributeValue = $item->getAttribute($field);
            $attributeValue = $item->$field;

            //if this column is in our objects array, render the output with the given value
            if (isset($columns[$field])) {
                $outputRow[$field] = array(
                    'raw'      => $attributeValue,
                    'rendered' => $columns[$field]->renderOutput($attributeValue, $item),
                );
            }
            //otherwise it's likely the primary key column which wasn't included (though it's needed for identification purposes)
            else {
                $outputRow[$field] = array(
                    'raw'      => $attributeValue,
                    'rendered' => $attributeValue,
                );
            }
        }
    }
public function parseOnTableColumns($item, array &$outputRow)
    {
        if (method_exists($item, 'presenter')) {
            $item = $item->presenter();
        }

        $columns         = $this->columnFactory->getColumns();
        $includedColumns = $this->columnFactory->getIncludedColumns($this->fieldFactory->getEditFields());
        $relatedColumns  = $this->columnFactory->getRelatedColumns();

        //loop over both the included and related columns
        foreach (array_merge($includedColumns, $relatedColumns) as $field => $col) {
            //            $attributeValue = $item->getAttribute($field);
            $attributeValue = $item->$field;

            //if this column is in our objects array, render the output with the given value
            if (isset($columns[$field])) {
                $outputRow[$field] = array(
                    'raw'      => $attributeValue,
                    'rendered' => $columns[$field]->renderOutput($attributeValue, $item),
                );
            }
            //otherwise it's likely the primary key column which wasn't included (though it's needed for identification purposes)
            else {
                $outputRow[$field] = array(
                    'raw'      => $attributeValue,
                    'rendered' => $attributeValue,
                );
            }
        }
    }
public function parseOnTableColumns ( $ item , array & $ outputRow ) { if ( method_exists ( $ item , 'presenter' ) ) { $ item = $ item -> presenter ( ) ; } $ columns = $ this -> columnFactory -> getColumns ( ) ; $ includedColumns = $ this -> columnFactory -> getIncludedColumns ( $ this -> fieldFactory -> getEditFields ( ) ) ; $ relatedColumns = $ this -> columnFactory -> getRelatedColumns ( ) ; //loop over both the included and related columns foreach ( array_merge ( $ includedColumns , $ relatedColumns ) as $ field => $ col ) { //            $attributeValue = $item->getAttribute($field); $ attributeValue = $ item -> $ field ; //if this column is in our objects array, render the output with the given value if ( isset ( $ columns [ $ field ] ) ) { $ outputRow [ $ field ] = array ( 'raw' => $ attributeValue , 'rendered' => $ columns [ $ field ] -> renderOutput ( $ attributeValue , $ item ) , ) ; } //otherwise it's likely the primary key column which wasn't included (though it's needed for identification purposes) else { $ outputRow [ $ field ] = array ( 'raw' => $ attributeValue , 'rendered' => $ attributeValue , ) ; } } }
Goes through all related columns and sets the proper values for this row.

@param \Illuminate\Database\Eloquent\Model $item
@param array                               $outputRow
Goes through all related columns and sets the proper values for this row .