Skip to content

Commit 2afb557

Browse files
authored
Merge pull request #11 from challet/patch-1
Fix wrong collection function call.
2 parents 50e8c69 + 4464b36 commit 2afb557

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

engine/collection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Route::get('user-data', function() {
3333
['id' => 3, 'name' => 'James'],
3434
]);
3535

36-
return DataTables::queryBuilder($collection)->toJson();
36+
return DataTables::collection($collection)->toJson();
3737
});
3838
```
3939

@@ -50,7 +50,7 @@ Route::get('user-data', function(DataTables $datatables) {
5050
['id' => 3, 'name' => 'James'],
5151
]);
5252

53-
return $datatables->queryBuilder($collection)->toJson();
53+
return $datatables->collection($collection)->toJson();
5454
});
5555
```
5656
<a name="ioc"></a>
@@ -65,7 +65,7 @@ Route::get('user-data', function() {
6565
['id' => 3, 'name' => 'James'],
6666
]);
6767

68-
return app('datatables')->queryBuilder($collection)->toJson();
68+
return app('datatables')->collection($collection)->toJson();
6969
});
7070
```
7171

0 commit comments

Comments
 (0)