File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 3030 - [Edit Column](/docs/{{package}}/{{version}}/edit-column)
3131 - [Remove Column](/docs/{{package}}/{{version}}/remove-column)
3232 - [Index Column](/docs/{{package}}/{{version}}/index-column)
33+ - [Raw Columns](/docs/{{package}}/{{version}}/raw-columns)
3334- Row Editing
3435 - [Row Options](/docs/{{package}}/{{version}}/row-options)
3536 - [Row ID](/docs/{{package}}/{{version}}/row-options#row-id)
Original file line number Diff line number Diff line change 1+ # Raw Columns
2+
3+ By default, Laravel DataTables protects us from XSS attack by esacping all our outputs.
4+ In cases where you want to render an html content, please use ` rawColumns ` api.
5+
6+
7+ ``` php
8+ use Datatables;
9+
10+ Route::get('user-data', function() {
11+ $model = App\User::query();
12+
13+ return Datatables::eloquent($model)
14+ ->addColumn('link', '<a href =" #" >Html Column</a >')
15+ ->addColumn('action', 'path.to.view')
16+ ->rawColumns(['link', 'action'])
17+ ->make(true);
18+ });
19+ ```
20+
You can’t perform that action at this time.
0 commit comments