1 回答
TA贡献1802条经验 获得超4个赞
在这里找到答案https://www.gitmemory.com/issue/yajra/laravel-datatables-editor/46/552975895
views/layouts/app.blade.php,就在</head>之前
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.3.1/css/select.dataTables.min.css"/>
</head>
views/layouts/app.blade.php,就在</body>之前
<script type="text/javascript" src="https://cdn.datatables.net/select/1.3.1/js/dataTables.select.js"></script>
@stack('scripts')
</body>
应用程序/DataTables/UsersDataTable.php
return $this->builder()
->setTableId('users-table')
->columns($this->getColumns())
->minifiedAjax()
->dom('Bfrtip')
// ---------------------------------------------
->select(true)
//---------------------------------------------
->orderBy(1)
->buttons(
Button::make('create')->editor('editor'),
Button::make('edit')->editor('editor'),
Button::make('remove')->editor('editor'),
Button::make('export'),
Button::make('print'),
Button::make('reset'),
Button::make('reload')
)
->editor(
Editor::make()
->fields([
Fields\Text::make('name'),
Fields\Text::make('email'),
Fields\Password::make('password'),
])
//---------------------------------------------
->idSrc(['id'])
//---------------------------------------------
);
- 1 回答
- 0 关注
- 78 浏览
添加回答
举报