# DataTables

DataTables is a plugin to convert html tables into dynamic tables, allowing fast search, sorting, pagination, etc.

https://datatables.net/ (opens new window)

DataTables

# 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 :

# 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