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.

Raw Columns

By default, Laravel DataTables protects us from XSS attack by esacping all our outputs. In cases where you want to render an html content, please use rawColumns api.

use Datatables;
 
Route::get('user-data', function() {
$model = App\User::query();
 
return Datatables::eloquent($model)
->addColumn('link', '<a href="#">Html Column</a>')
->addColumn('action', 'path.to.view')
->rawColumns(['link', 'action'])
->make(true);
});