Skip to content

Commit 8ac87b7

Browse files
author
Herbert Maschke
committed
rename livewire:datatable to make:livewire-datatable as it is the canon of other make: commands in laravel
1 parent 730f198 commit 8ac87b7

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ somewhere in your CSS
9494
## Component Syntax
9595

9696
### Create a livewire component that extends ```Mediconesystems\LivewireDatatables\LivewireDatatable```
97-
> ```php artisan livewire:datatable foo``` --> 'app/Http/Livewire/Foo.php'
97+
> ```php artisan make:livewire-datatable foo``` --> 'app/Http/Livewire/Foo.php'
9898
99-
> ```php artisan livewire:datatable tables.bar``` --> 'app/Http/Livewire/Tables/Bar.php'
99+
> ```php artisan make:livewire-datatable tables.bar``` --> 'app/Http/Livewire/Tables/Bar.php'
100100
101101
### Provide a datasource by declaring public property ```$model``` **OR** public method ```builder()``` that returns an instance of ```Illuminate\Database\Eloquent\Builder```
102-
> ```php artisan livewire:datatable users-table --model=user``` --> 'app/Http/Livewire/UsersTable.php' with ```public $model = User::class```
102+
> ```php artisan make:livewire-datatable users-table --model=user``` --> 'app/Http/Livewire/UsersTable.php' with ```public $model = User::class```
103103
104104
### Declare a public method ```columns``` that returns an array containing one or more ```Mediconesystems\LivewireDatatables\Column```
105105

src/Commands/MakeDatatableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class MakeDatatableCommand extends FileManipulationCommand
1010
{
11-
protected $signature = 'livewire:datatable {name} {--model=}';
11+
protected $signature = 'make:livewire-datatable {name} {--model=}';
1212

1313
protected $desciption = 'Create a new Livewire Datatable';
1414

tests/MakeDatatableCommandTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,55 +12,55 @@ class MakeDatatableCommandTest extends TestCase
1212
/** @test */
1313
public function component_is_created_by_make_command()
1414
{
15-
Artisan::call('livewire:datatable', ['name' => 'foo']);
15+
Artisan::call('make:livewire-datatable', ['name' => 'foo']);
1616

1717
$this->assertTrue(File::exists($this->livewireClassesPath('Foo.php')));
1818
}
1919

2020
/** @test */
2121
public function dot_nested_component_is_created_by_make_command()
2222
{
23-
Artisan::call('livewire:datatable', ['name' => 'foo.bar']);
23+
Artisan::call('make:livewire-datatable', ['name' => 'foo.bar']);
2424

2525
$this->assertTrue(File::exists($this->livewireClassesPath('Foo/Bar.php')));
2626
}
2727

2828
/** @test */
2929
public function forward_slash_nested_component_is_created_by_make_command()
3030
{
31-
Artisan::call('livewire:datatable', ['name' => 'foo/bar']);
31+
Artisan::call('make:livewire-datatable', ['name' => 'foo/bar']);
3232

3333
$this->assertTrue(File::exists($this->livewireClassesPath('Foo/Bar.php')));
3434
}
3535

3636
/** @test */
3737
public function multiword_component_is_created_by_make_command()
3838
{
39-
Artisan::call('livewire:datatable', ['name' => 'foo-bar']);
39+
Artisan::call('make:livewire-datatable', ['name' => 'foo-bar']);
4040

4141
$this->assertTrue(File::exists($this->livewireClassesPath('FooBar.php')));
4242
}
4343

4444
/** @test */
4545
public function pascal_case_component_is_automatically_converted_by_make_command()
4646
{
47-
Artisan::call('livewire:datatable', ['name' => 'FooBar.FooBar']);
47+
Artisan::call('make:livewire-datatable', ['name' => 'FooBar.FooBar']);
4848

4949
$this->assertTrue(File::exists($this->livewireClassesPath('FooBar/FooBar.php')));
5050
}
5151

5252
/** @test */
5353
public function snake_case_component_is_automatically_converted_by_make_command()
5454
{
55-
Artisan::call('livewire:datatable', ['name' => 'text_replace']);
55+
Artisan::call('make:livewire-datatable', ['name' => 'text_replace']);
5656

5757
$this->assertTrue(File::exists($this->livewireClassesPath('TextReplace.php')));
5858
}
5959

6060
/** @test */
6161
public function snake_case_component_is_automatically_converted_by_make_command_on_nested_component()
6262
{
63-
Artisan::call('livewire:datatable', ['name' => 'TextManager.text_replace']);
63+
Artisan::call('make:livewire-datatable', ['name' => 'TextManager.text_replace']);
6464

6565
$this->assertTrue(File::exists($this->livewireClassesPath('TextManager/TextReplace.php')));
6666
}
@@ -79,7 +79,7 @@ public function new_component_model_name_matches_option()
7979
/** @test */
8080
public function a_component_is_not_created_with_a_reserved_class_name()
8181
{
82-
Artisan::call('livewire:datatable', ['name' => 'component']);
82+
Artisan::call('make:livewire-datatable', ['name' => 'component']);
8383

8484
$this->assertFalse(File::exists($this->livewireClassesPath('Component.php')));
8585
}

0 commit comments

Comments
 (0)