protected function getRelationColumnValue($columnName, $record)
    {
        list($relationName, $relationColumnName) = getRelationDetails($columnName);

        if ($methodName = $this->customisesColumnValue($relationName.'_'.$relationColumnName)) {
            return $record->$methodName();
        }

        if ($record->$relationName) {
            return $record->$relationName->$relationColumnName;
        }

        return 'N/A';
    }
protected function getRelationColumnValue($columnName, $record)
    {
        list($relationName, $relationColumnName) = getRelationDetails($columnName);

        if ($methodName = $this->customisesColumnValue($relationName.'_'.$relationColumnName)) {
            return $record->$methodName();
        }

        if ($record->$relationName) {
            return $record->$relationName->$relationColumnName;
        }

        return 'N/A';
    }
protected function getRelationColumnValue ( $ columnName , $ record ) { list ( $ relationName , $ relationColumnName ) = getRelationDetails ( $ columnName ) ; if ( $ methodName = $ this -> customisesColumnValue ( $ relationName . '_' . $ relationColumnName ) ) { return $ record -> $ methodName ( ) ; } if ( $ record -> $ relationName ) { return $ record -> $ relationName -> $ relationColumnName ; } return 'N/A' ; }
Returns the value of relation table column.

@param string Name of the column
@param \Illuminate\Database\Eloquent\Model Eloquent object

@return string
Returns the value of relation table column .