Yajra\Datatables\Html\Builder::compileTableHeaders PHP Method

compileTableHeaders() private method

Compile table headers and to support responsive extension.
private compileTableHeaders ( ) : array
return array
    private function compileTableHeaders()
    {
        $th = [];
        foreach ($this->collection->toArray() as $row) {
            $thAttr = $this->html->attributes(array_only($row, ['class', 'id', 'width', 'style', 'data-class', 'data-hide']));
            $th[] = '<th ' . $thAttr . '>' . $row['title'] . '</th>';
        }
        return $th;
    }