Skip to content
Icon

WARNING You're browsing the documentation for an old version of LARAVEL-DATATABLES. Consider upgrading your project to laravel-datatables 11.0.

Html Builder - Column Builder

Column Builder is a fluent class that we can use to build our columns.

Upgrading Your Existing Column Definitions

FROM

$column = [
'name' => 'id',
'data' => 'id',
'title' => 'Id',
'searchable' => true,
'orderable' => true,
'render' => 'function(){}',
'footer' => 'Id',
'exportable' => true,
'printable' => true,
];

TO

use Yajra\DataTables\Html\Column;
 
$column = Column::make('id')
->title('Id')
->searchable(true)
->orderable(true)
->render('function(){}')
->footer('Id')
->exportable(true)
->printable(true);