XSS filtering

To prevent XSS attack on some of your columns, you can use escapeColumns api.

Escape selected fields

return Datatables::eloquent(Role::select())
            ->escapeColumns(['name'])
            ->make(true);

Escape all columns

return Datatables::eloquent(Role::select())
            ->escapeColumns()
            ->make(true);

Escape by output index

return Datatables::eloquent(Role::select())
            ->escapeColumns([0])
            ->make();