Skip to content

Commit e229444

Browse files
committed
add make command alias
1 parent 61ee893 commit e229444

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Commands/MakeCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ class MakeCommand extends Command
1313

1414
public $description = 'create new blog file from string';
1515

16+
public function __construct()
17+
{
18+
parent::__construct();
19+
$this->setAliases(['make:blog']);
20+
}
21+
1622
public function handle(): void
1723
{
1824
$slug = Str::slug(

tests/src/Commands/MakeCommandTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ public function it_has_a_make_command()
1515
$this->assertTrue(Arr::has(Artisan::all(), 'blog:make'));
1616
}
1717

18+
/** @test */
19+
public function it_has_a_make_command_alias()
20+
{
21+
$this->assertTrue(Arr::has(Artisan::all(), 'make:blog'));
22+
}
23+
1824
/** @test */
1925
public function it_sluggifies_a_title()
2026
{

0 commit comments

Comments
 (0)