Skip to content

Commit 71ad188

Browse files
committed
Rename Datatables to DataTables.
1 parent 4ec15a4 commit 71ad188

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+181
-181
lines changed

add-column.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ You can add a custom column on your response by using `addColumn` api.
66
## Add Column with Blade Syntax
77

88
```php
9-
use Datatables;
9+
use DataTables;
1010

1111
Route::get('user-data', function() {
1212
$model = App\User::query();
1313

14-
return Datatables::eloquent($model)
14+
return DataTables::eloquent($model)
1515
->addColumn('intro', 'Hi {{$name}}!')
1616
->make(true);
1717
});
@@ -21,12 +21,12 @@ Route::get('user-data', function() {
2121
## Add Column with Closure
2222

2323
```php
24-
use Datatables;
24+
use DataTables;
2525

2626
Route::get('user-data', function() {
2727
$model = App\User::query();
2828

29-
return Datatables::eloquent($model)
29+
return DataTables::eloquent($model)
3030
->addColumn('intro', function(User $user) {
3131
return 'Hi ' . $user->name . '!';
3232
})
@@ -40,12 +40,12 @@ Route::get('user-data', function() {
4040
> {tip} You can use view to render your added column by passing the view path as the second argument on `addColumn` api.
4141
4242
```php
43-
use Datatables;
43+
use DataTables;
4444

4545
Route::get('user-data', function() {
4646
$model = App\User::query();
4747

48-
return Datatables::eloquent($model)
48+
return DataTables::eloquent($model)
4949
->addColumn('intro', 'users.datatables.intro')
5050
->make(true);
5151
});
@@ -62,12 +62,12 @@ Hi {{ $name }}!
6262
> {tip} Just pass the column order as the third argument of `addColumn` api.
6363
6464
```php
65-
use Datatables;
65+
use DataTables;
6666

6767
Route::get('user-data', function() {
6868
$model = App\User::query();
6969

70-
return Datatables::eloquent($model)
70+
return DataTables::eloquent($model)
7171
->addColumn('intro', 'Hi {{$name}}!', 2)
7272
->make(true);
7373
});

blacklist.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Sorting and searching will not work on columns explicitly defined as blacklisted.
44

55
```php
6-
use Datatables;
6+
use DataTables;
77

88
Route::get('user-data', function() {
99
$model = App\User::query();
1010

11-
return Datatables::eloquent($model)
11+
return DataTables::eloquent($model)
1212
->blacklist(['password', 'name'])
1313
->make(true);
1414
});
15-
```
15+
```

buttons-console.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ This will create an `PostsDataTable` class on `app\DataTables` directory.
2424
namespace App\DataTables;
2525

2626
use App\User;
27-
use Yajra\Datatables\Services\DataTable;
27+
use Yajra\DataTables\Services\DataTable;
2828

2929
class PostsDataTable extends DataTable
3030
{
3131
/**
3232
* Build DataTable class.
3333
*
34-
* @return \Yajra\Datatables\Engines\BaseEngine
34+
* @return \Yajra\DataTables\Engines\BaseEngine
3535
*/
3636
public function dataTable()
3737
{
@@ -55,7 +55,7 @@ class PostsDataTable extends DataTable
5555
/**
5656
* Optional method if you want to use html builder.
5757
*
58-
* @return \Yajra\Datatables\Html\Builder
58+
* @return \Yajra\DataTables\Html\Builder
5959
*/
6060
public function html()
6161
{
@@ -110,14 +110,14 @@ The exported filename will also be set to `posts_(timestamp)`.
110110
namespace App\DataTables;
111111

112112
use App\Post;
113-
use Yajra\Datatables\Services\DataTable;
113+
use Yajra\DataTables\Services\DataTable;
114114

115115
class PostsDataTable extends DataTable
116116
{
117117
/**
118118
* Build DataTable class.
119119
*
120-
* @return \Yajra\Datatables\Engines\BaseEngine
120+
* @return \Yajra\DataTables\Engines\BaseEngine
121121
*/
122122
public function dataTable()
123123
{
@@ -141,7 +141,7 @@ class PostsDataTable extends DataTable
141141
/**
142142
* Optional method if you want to use html builder.
143143
*
144-
* @return \Yajra\Datatables\Html\Builder
144+
* @return \Yajra\DataTables\Html\Builder
145145
*/
146146
public function html()
147147
{
@@ -225,7 +225,7 @@ This will create an `ActiveUser` class on `app\DataTables\Scopes` directory.
225225
```php
226226
namespace App\DataTables\Scopes;
227227

228-
use Yajra\Datatables\Contracts\DataTableScopeContract;
228+
use Yajra\DataTables\Contracts\DataTableScopeContract;
229229

230230
class ActiveUser implements DataTableScopeContract
231231
{

buttons-custom.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ request) and enabling a `myCustomAction`.
1111
namespace App\DataTables;
1212

1313
use App\User;
14-
use Yajra\Datatables\Services\DataTable;
14+
use Yajra\DataTables\Services\DataTable;
1515

1616
class UsersDataTable extends DataTable
1717
{
@@ -35,4 +35,4 @@ class UsersDataTable extends DataTable
3535
}
3636
```
3737

38-
Take a look at `Yajra\Datatables\Services\DataTable` to see how to fetch and manipulate the data (functions `excel`, `csv`, `pdf`).
38+
Take a look at `Yajra\DataTables\Services\DataTable` to see how to fetch and manipulate the data (functions `excel`, `csv`, `pdf`).

buttons-export.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Export button group includes `excel`, `csv` and `pdf` button.
1010
namespace App\DataTables;
1111

1212
use App\User;
13-
use Yajra\Datatables\Services\DataTable;
13+
use Yajra\DataTables\Services\DataTable;
1414

1515
class UsersDataTable extends DataTable
1616
{
@@ -36,7 +36,7 @@ To enable exporting to excel, set `excel` on the buttons array.
3636
namespace App\DataTables;
3737

3838
use App\User;
39-
use Yajra\Datatables\Services\DataTable;
39+
use Yajra\DataTables\Services\DataTable;
4040

4141
class UsersDataTable extends DataTable
4242
{
@@ -62,7 +62,7 @@ To enable exporting to csv, set `csv` on the buttons array.
6262
namespace App\DataTables;
6363

6464
use App\User;
65-
use Yajra\Datatables\Services\DataTable;
65+
use Yajra\DataTables\Services\DataTable;
6666

6767
class UsersDataTable extends DataTable
6868
{
@@ -88,7 +88,7 @@ To enable exporting to pdf, set `pdf` on the buttons array.
8888
namespace App\DataTables;
8989

9090
use App\User;
91-
use Yajra\Datatables\Services\DataTable;
91+
use Yajra\DataTables\Services\DataTable;
9292

9393
class UsersDataTable extends DataTable
9494
{
@@ -114,7 +114,7 @@ To enable print button, set `print` on the buttons array.
114114
namespace App\DataTables;
115115

116116
use App\User;
117-
use Yajra\Datatables\Services\DataTable;
117+
use Yajra\DataTables\Services\DataTable;
118118

119119
class UsersDataTable extends DataTable
120120
{
@@ -140,7 +140,7 @@ To enable reset button, set `reset` on the buttons array.
140140
namespace App\DataTables;
141141

142142
use App\User;
143-
use Yajra\Datatables\Services\DataTable;
143+
use Yajra\DataTables\Services\DataTable;
144144

145145
class UsersDataTable extends DataTable
146146
{
@@ -166,7 +166,7 @@ To enable reload button, set `reload` on the buttons array.
166166
namespace App\DataTables;
167167

168168
use App\User;
169-
use Yajra\Datatables\Services\DataTable;
169+
use Yajra\DataTables\Services\DataTable;
170170

171171
class UsersDataTable extends DataTable
172172
{

buttons-extended.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ TO
3535
## Quick Example:
3636
```php
3737
Route::get('datatable', function(RolesDataTable $dataTable){
38-
return $dataTable->before(function (\Yajra\Datatables\Engines\BaseEngine $dataTable) {
38+
return $dataTable->before(function (\Yajra\DataTables\Engines\BaseEngine $dataTable) {
3939
return $dataTable->addColumn('test', 'added inside controller');
4040
})
4141
->response(function (\Illuminate\Support\Collection $response) {
4242
$response['test'] = 'Append Data';
4343

4444
return $response;
4545
})
46-
->withHtml(function(\Yajra\Datatables\Html\Builder $builder) {
46+
->withHtml(function(\Yajra\DataTables\Html\Builder $builder) {
4747
$builder->columns(['id', 'name', 'etc...']);
4848
})
4949
->with('key', 'value')

buttons-installation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Open the file ```config/app.php``` and then add following service provider.
99
```php
1010
'providers' => [
1111
// ...
12-
Yajra\Datatables\DatatablesServiceProvider::class,
13-
Yajra\Datatables\ButtonsServiceProvider::class,
12+
Yajra\DataTables\DataTablesServiceProvider::class,
13+
Yajra\DataTables\ButtonsServiceProvider::class,
1414
],
1515
```
1616

buttons-starter.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Update `UsersDataTable` class and set the columns and parameters needed to rende
1515
namespace App\DataTables;
1616

1717
use App\User;
18-
use Yajra\Datatables\Services\DataTable;
18+
use Yajra\DataTables\Services\DataTable;
1919

2020
class UsersDataTable extends DataTable
2121
{
@@ -73,4 +73,4 @@ Our `users.index` view located at `resources/views/users/index.blade.php`.
7373
<script src="/vendor/datatables/buttons.server-side.js"></script>
7474
{!! $dataTable->scripts() !!}
7575
@endpush
76-
```
76+
```

edit-column.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ You can edit a column on your response by using `editColumn` api.
66
## Edit Column with Blade Syntax
77

88
```php
9-
use Datatables;
9+
use DataTables;
1010

1111
Route::get('user-data', function() {
1212
$model = App\User::query();
1313

14-
return Datatables::eloquent($model)
14+
return DataTables::eloquent($model)
1515
->editColumn('name', 'Hi {{$name}}!')
1616
->make(true);
1717
});
@@ -21,12 +21,12 @@ Route::get('user-data', function() {
2121
## Edit Column with Closure
2222

2323
```php
24-
use Datatables;
24+
use DataTables;
2525

2626
Route::get('user-data', function() {
2727
$model = App\User::query();
2828

29-
return Datatables::eloquent($model)
29+
return DataTables::eloquent($model)
3030
->editColumn('name', function(User $user) {
3131
return 'Hi ' . $user->name . '!';
3232
})
@@ -40,12 +40,12 @@ Route::get('user-data', function() {
4040
> {tip} You can use view to render your added column by passing the view path as the second argument on `editColumn` api.
4141
4242
```php
43-
use Datatables;
43+
use DataTables;
4444

4545
Route::get('user-data', function() {
4646
$model = App\User::query();
4747

48-
return Datatables::eloquent($model)
48+
return DataTables::eloquent($model)
4949
->editColumn('name', 'users.datatables.into')
5050
->make(true);
5151
});

engine-collection.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Collection Data Source
22

33
You may use Laravel's Collection as data source for your dataTables.
4-
You can look at `Yajra\Datatables\Enginges\CollectionEngine` class which handles the conversion of your Collection into a readbale DataTable API response.
4+
You can look at `Yajra\DataTables\Enginges\CollectionEngine` class which handles the conversion of your Collection into a readbale DataTable API response.
55

66
<a name="factory"></a>
77
## Collection via Factory
88

99
```php
10-
use Datatables;
10+
use DataTables;
1111

1212
Route::get('user-data', function() {
1313
$collection = collect([
@@ -16,15 +16,15 @@ Route::get('user-data', function() {
1616
['id' => 3, 'name' => 'James'],
1717
]);
1818

19-
return Datatables::of($collection)->make(true);
19+
return DataTables::of($collection)->make(true);
2020
});
2121
```
2222

2323
<a name="facade"></a>
2424
## Collection via Facade
2525

2626
```php
27-
use Datatables;
27+
use DataTables;
2828

2929
Route::get('user-data', function() {
3030
$collection = collect([
@@ -33,17 +33,17 @@ Route::get('user-data', function() {
3333
['id' => 3, 'name' => 'James'],
3434
]);
3535

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

4040
<a name="dependency-injection"></a>
4141
## Collection via Dependency Injection
4242

4343
```php
44-
use Yajra\Datatables\Datatables;
44+
use Yajra\DataTables\DataTables;
4545

46-
Route::get('user-data', function(Datatables $datatables) {
46+
Route::get('user-data', function(DataTables $datatables) {
4747
$collection = collect([
4848
['id' => 1, 'name' => 'John'],
4949
['id' => 2, 'name' => 'Jane'],

0 commit comments

Comments
 (0)