Skip to content

Commit 79072e0

Browse files
committed
Fix sass path and add setRowId.
1 parent bc8222d commit 79072e0

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

editor-tutorial.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Copy and rename your `Editor.XX.zip` to `Editor.zip` and move it to project fold
3737
} catch (e) {}
3838

3939

40-
## Add editor styles on `resources/scss/app.scss`.
40+
## Add editor styles on `resources/sass/app.scss`.
4141

4242
@import "~datatables.net-select-bs4/css/select.bootstrap4.css";
4343
@import "~datatables.net-editor-bs4/css/editor.bootstrap4.css";
@@ -73,6 +73,20 @@ use Yajra\DataTables\Html\Editor\Editor;
7373
use Yajra\DataTables\Html\Editor\Fields;
7474

7575
...
76+
/**
77+
* Build DataTable class.
78+
*
79+
* @param mixed $query Results from query() method.
80+
* @return \Yajra\DataTables\DataTableAbstract
81+
*/
82+
public function dataTable($query)
83+
{
84+
return datatables()
85+
->eloquent($query)
86+
->setRowId('id') // Set the RowID
87+
...
88+
}
89+
7690
public function html()
7791
{
7892
return $this->builder()

0 commit comments

Comments
 (0)