You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eloquent compatible DataTable plugin for server side ajax call handling.
3
3
4
4
If you are familiar with eloquent and would like to use it in combination with [datatables](https://www.datatables.net/) this is what you are looking for.
@@ -24,10 +24,17 @@ var table = $('#example').DataTable({
24
24
### Step 3: Use it
25
25
```php
26
26
$users = new Models\User();
27
-
$dataTable = new \LiveControl\EloquentDataTable\DataTable($users, ['email', 'firstname', 'lastname']);
27
+
$dataTable = new LiveControl\EloquentDataTable\DataTable($users, ['email', 'firstname', 'lastname']);
28
28
echo json_encode($dataTable->make());
29
29
```
30
30
31
+
### Optional step 4: Set versions of DataTables plugin.
32
+
Just initialize the DataTable object as you would normally and call the setVersionTransformer function as in the following example (for version 1.09 of DataTables):
0 commit comments