src/QueryDataTable.php
protected function attachAppends(array $data)
    {
        $appends = [];
        foreach ($this->appends as $key => $value) {
            if (is_callable($value)) {
                $appends[$key] = value($value($this->getFilteredQuery()));
            } else {
                $appends[$key] = $value;
            }
        }

        return array_merge($data, $appends);
    }
protected function attachAppends(array $data)
    {
        $appends = [];
        foreach ($this->appends as $key => $value) {
            if (is_callable($value)) {
                $appends[$key] = value($value($this->getFilteredQuery()));
            } else {
                $appends[$key] = $value;
            }
        }

        return array_merge($data, $appends);
    }
protected function attachAppends ( array $ data ) { $ appends = [ ] ; foreach ( $ this -> appends as $ key => $ value ) { if ( is_callable ( $ value ) ) { $ appends [ $ key ] = value ( $ value ( $ this -> getFilteredQuery ( ) ) ) ; } else { $ appends [ $ key ] = $ value ; } } return array_merge ( $ data , $ appends ) ; }
Attach custom with meta on response.

@param array $data
@return array
Attach custom with meta on response .