File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 3737Route::get('datatable', function(RolesDataTable $dataTable){
3838 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+ })
41+ ->response(function (\Illuminate\Support\Collection $response) {
4142 $response['test'] = 'Append Data';
4243
4344 return $response;
44- })->withHtml(function(\Yajra\Datatables\Html\Builder $builder) {
45+ })
46+ ->withHtml(function(\Yajra\Datatables\Html\Builder $builder) {
4547 $builder->columns(['id', 'name', 'etc...']);
46- })->render('path.to.view');
48+ })
49+ ->with('key', 'value')
50+ ->with([
51+ 'key2' => 'value2',
52+ 'key3' => 'value3',
53+ ])
54+ ->render('path.to.view');
4755});
4856```
You can’t perform that action at this time.
0 commit comments