Skip to content

Commit c4ec807

Browse files
committed
Add withHtml builder callback.
1 parent b8de63f commit c4ec807

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

buttons-extended.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ TO
3535
## Quick Example:
3636
```php
3737
Route::get('datatable', function(RolesDataTable $dataTable){
38-
return $dataTable->before(function (Yajra\Datatables\Engines\BaseEngine $dataTable) {
38+
return $dataTable->before(function (\Yajra\Datatables\Engines\BaseEngine $dataTable) {
3939
return $dataTable->addColumn('test', 'added inside controller');
40-
})->response(function (Illuminate\Support\Collection $response) {
40+
})->response(function (\Illuminate\Support\Collection $response) {
4141
$response['test'] = 'Append Data';
4242

4343
return $response;
44+
})->withHtml(function(\Yajra\Datatables\Html\Builder $builder) {
45+
$builder->columns(['id', 'name', 'etc...']);
4446
})->render('path.to.view');
4547
});
4648
```

0 commit comments

Comments
 (0)