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 Index Column

You can use addIndex api for a quick adding of column with a pre-defined sets attibutes. Add index column is mostly used for creating a column that contains a the internal index of the current record being displayed.

The default attributes of index column are:

[
'defaultContent' => '',
'data' => 'DT_Row_Index',
'name' => 'DT_Row_Index',
'title' => '',
'render' => null,
'orderable' => false,
'searchable' => false,
'exportable' => false,
'printable' => true,
'footer' => '',
];

The addIndex api should be used along with addIndexColumn of Datatables.