Skip to content

Commit a54b469

Browse files
committed
add exportRender how to use to document (this method added on commit d48dc1bbe8bc860070240d6f1444e7a861c53789 to be used for render column for print or export as we expected)
1 parent ab0099d commit a54b469

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

html-builder-column-builder.md

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $column = Column::make('id')
3131
->searchable(true)
3232
->orderable(true)
3333
->render('\'<div class="editor-active" >\' + (full[\'deleted_at\'] == null ? \'<i class="fas fa-check-circle client-is-active"></i>Active\' : \'<i class="fas fa-times-circle"></i>Inactive\') + \'</div>\';\'\'' )
34+
->render(function($row,$data){return $data == 1 ? 'Active' : 'Inactive'})
3435
->footer('Id')
3536
->exportable(true)
3637
->printable(true);

html-builder-column.md

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Orderable attribute will toggle the `ordering` ability for the defined column. D
4747
### Render (Optional)
4848
Render attribute is a `js` script string that you can use to modify the way the column is being rendered via `javascript`.
4949

50+
### Export Render (Optional)
51+
Export Render attribute is a `php callback function` that you can use to modify the way the column is being rendered via `print` or `export (CSV/Excel/PDF)`.
52+
53+
5054
### Footer (Optional)
5155
Footer attribute will be as your `tables` column's `footer` content `<tfoot></tfoot>`.
5256

0 commit comments

Comments
 (0)