Skip to content

Commit 7f51b1f

Browse files
Minor changes in the examples
1 parent 2308808 commit 7f51b1f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class UserController {
5656
['email', 'firstname', 'lastname']
5757
);
5858

59-
return response()->json($dataTable->make());
59+
return $dataTable->make();
6060
}
6161
}
6262
```
@@ -77,7 +77,7 @@ class UserController {
7777
['email', ['firstname', 'lastname'], 'city']
7878
);
7979

80-
return response()->json($dataTable->make());
80+
return $dataTable->make();
8181
}
8282
}
8383
```
@@ -102,7 +102,7 @@ class UserController {
102102
]
103103
);
104104

105-
return response()->json($dataTable->make());
105+
return $dataTable->make();
106106
}
107107
}
108108
```
@@ -111,7 +111,6 @@ class UserController {
111111
If 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.
112112
```php
113113
use LiveControl\EloquentDataTable\DataTable;
114-
use LiveControl\EloquentDataTable\ExpressionWithName;
115114

116115
class UserController {
117116
...
@@ -130,7 +129,7 @@ class UserController {
130129
];
131130
});
132131

133-
return response()->json($dataTable->make());
132+
return $dataTable->make();
134133
}
135134
}
136135
```

0 commit comments

Comments
 (0)