# DataTables
DataTables is a plugin to convert html tables into dynamic tables, allowing fast search, sorting, pagination, etc.
# Loading
To use DataTables on your page you can use the loading view boilerplate::load.datatables
(opens new window)
@include('boilerplate::load.datatables')
You can load plugins by passing their names to the loader :
@include('boilerplate::load.datatables', ['fixedHeader' => true])
The available plugins are :
- autoFill (opens new window)
- buttons (opens new window)
- colReorder (opens new window)
- fixedHeader (opens new window)
- keyTable (opens new window)
- responsive (opens new window)
- rowGroup (opens new window)
- rowReorder (opens new window)
- scroller (opens new window)
- searchBuilder (opens new window)
- searchPanes (opens new window)
- select (opens new window)
# API
Boilerplate is delivered with the excellent package yajra/laravel-datatables
(opens new window) to load data in controllers via ajax.
https://yajrabox.com/docs/laravel-datatables (opens new window)
# Usage
You can see an example of use in UsersController (opens new window) and list.blade.php (opens new window)
@include('boilerplate::load.datatables')
@push('js')
<script>
$('#dt').dataTable();
</script>
@endpush