public function transformRecords($records)
    {
        if (method_exists($this->class, 'laratablesModifyCollection')) {
            $records = $this->class::laratablesModifyCollection($records)->values();
        }

        return $records->map(function ($item) {
            return $this->transformRecord($item);
        });
    }
public function transformRecords($records)
    {
        if (method_exists($this->class, 'laratablesModifyCollection')) {
            $records = $this->class::laratablesModifyCollection($records)->values();
        }

        return $records->map(function ($item) {
            return $this->transformRecord($item);
        });
    }
public function transformRecords ( $ records ) { if ( method_exists ( $ this -> class , 'laratablesModifyCollection' ) ) { $ records = $ this -> class :: laratablesModifyCollection ( $ records ) -> values ( ) ; } return $ records -> map ( function ( $ item ) { return $ this -> transformRecord ( $ item ) ; } ) ; }
Transforms each record for Datatables display.

@param \Illuminate\Support\Collection Records of the table

@return \Illuminate\Support\Collection Records of the table
Transforms each record for Datatables display .