Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3eb6554

Browse files
authored
Merge pull request #33 from lk77/patch-2
Adding dataTableVariable property to Services/DataTables.
2 parents 2e2adf7 + daa72ea commit 3eb6554

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎src/Services/DataTable.php‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ abstract class DataTable implements DataTableButtons
1818
* @var string
1919
*/
2020
protected $printPreview = 'datatables::print';
21-
21+
22+
/**
23+
* Name of the dataTable variable.
24+
*
25+
* @var string
26+
*/
27+
protected $dataTableVariable = 'dataTable';
28+
2229
/**
2330
* List of columns to be exported.
2431
*
@@ -118,7 +125,7 @@ public function render($view, $data = [], $mergeData = [])
118125
return app()->call([$this, $action]);
119126
}
120127

121-
return view($view, $data, $mergeData)->with('dataTable', $this->getHtmlBuilder());
128+
return view($view, $data, $mergeData)->with($this->dataTableVariable, $this->getHtmlBuilder());
122129
}
123130

124131
/**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /