Skip to content

Commit 2a704d2

Browse files
committed
chore: promote facade
1 parent 29ae17b commit 2a704d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
Laravel package for handling [server-side](https://www.datatables.net/manual/server-side) works of [DataTables](http://datatables.net) jQuery Plugin via [AJAX option](https://datatables.net/reference/option/ajax) by using Eloquent ORM, Fluent Query Builder or Collection.
1616

1717
```php
18-
return datatables()->eloquent(User::query())->toJson();
19-
return datatables()->query(DB::table('users'))->toJson();
20-
return datatables()->collection(User::all())->toJson();
18+
use \Yajra\DataTables\Facades\DataTables;
2119

22-
return datatables(User::query())->toJson();
23-
return datatables(DB::table('users'))->toJson();
24-
return datatables(User::all())->toJson();
20+
return DataTables::eloquent(User::query())->toJson();
21+
return DataTables::query(DB::table('users'))->toJson();
22+
return DataTables::collection(User::all())->toJson();
23+
24+
return DataTables::make(User::query())->toJson();
25+
return DataTables::make(DB::table('users'))->toJson();
26+
return DataTables::make(User::all())->toJson();
2527
```
2628

2729
## Sponsors

0 commit comments

Comments
 (0)