public function table(array $attributes = [], $drawFooter = false)
{
$this->tableAttributes = array_merge($this->tableAttributes, $attributes);
$th = $this->compileTableHeaders();
$htmlAttr = $this->html->attributes($this->tableAttributes);
$tableHtml = '<table ' . $htmlAttr . '>';
$tableHtml .= '<thead><tr>' . implode('', $th) . '</tr></thead>';
if ($drawFooter) {
$tf = $this->compileTableFooter();
$tableHtml .= '<tfoot><tr>' . implode('', $tf) . '</tr></tfoot>';
}
$tableHtml .= '</table>';
return $tableHtml;
}