@@ -24,8 +24,6 @@ echo json_encode($dataTable->make());
2424
2525### Basic example
2626``` php
27- namespace Acme;
28-
2927use LiveControl\EloquentDataTable\DataTable;
3028
3129class UserController {
@@ -47,8 +45,6 @@ In this case we are making a datatable response with all users who live in Londo
4745### Combining columns
4846If you want to combine the firstname and lastname into one column, you can wrap them into an array.
4947``` php
50- namespace Acme;
51-
5248use LiveControl\EloquentDataTable\DataTable;
5349
5450class UserController {
@@ -57,8 +53,8 @@ class UserController {
5753 {
5854 $users = new User();
5955 $dataTable = new DataTable(
60- $users
61- ['email', ['firstname', 'lastname'], 'city'],
56+ $users,
57+ ['email', ['firstname', 'lastname'], 'city']
6258 );
6359
6460 return response()->json($dataTable->make());
@@ -69,8 +65,6 @@ class UserController {
6965Sometimes you want to use custom sql statements on a column to get specific results,
7066this can be achieved using the ` ExpressionWithName ` class.
7167``` php
72- namespace Acme;
73-
7468use LiveControl\EloquentDataTable\DataTable;
7569use LiveControl\EloquentDataTable\ExpressionWithName;
7670
@@ -96,8 +90,6 @@ class UserController {
9690### Return custom row format
9791If you would like to return a custom row format you can do this by adding an anonymous function as an extra argument to the make method.
9892``` php
99- namespace Acme;
100-
10193use LiveControl\EloquentDataTable\DataTable;
10294use LiveControl\EloquentDataTable\ExpressionWithName;
10395
0 commit comments