I am creating yajra datatable class for showing report table. I also want to add export buttons.
so i added this in html builder
public function html(): HtmlBuilder
{
return $this->builder()
->setTableId('orderreport-table')
->columns($this->getColumns())
->minifiedAjax()
->buttons([
Button::make('excel'),
Button::make('csv'),
Button::make('pdf'),
Button::make('print'),
// Button::make('reset'),
// Button::make('reload')
])
;
}
but buttons did not show in browser. Button class is also imported.
Yajra DataTable view
added export functionality