Skip to content
Icon

WARNING You're browsing the documentation for an upcoming version of Laravel DataTables. The documentation and features of this release are subject to change.

HTML Builder Config

The HTML Builder configuration allows you to set default table attributes.


Installation

php artisan vendor:publish --tag=datatables-html

Configuration File

The published config file is located at config/datatables-html.php.


Configuration Options

<?php
 
return [
'table' => [
'class' => 'table table-bordered',
'id' => 'dataTable',
],
'script' => 'datatables::script',
];

Configuration Reference

Option Type Description
table.class string Default CSS classes for tables
table.id string Default table ID
script string Blade template path for scripts
scriptNonce string CSP nonce for inline scripts

See Also