diff --git a/src/Console/MakeCommand.php b/src/Console/MakeCommand.php index 6aa9e68..4a7f1ff 100644 --- a/src/Console/MakeCommand.php +++ b/src/Console/MakeCommand.php @@ -9,7 +9,7 @@ use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; -#[AsCommand(name: 'make:folio')] +#[AsCommand(name: 'folio:page', aliases: ['make:folio'])] class MakeCommand extends GeneratorCommand { /** @@ -17,7 +17,7 @@ class MakeCommand extends GeneratorCommand * * @var string */ - protected $name = 'make:folio'; + protected $name = 'folio:page'; /** * The console command description. @@ -33,6 +33,13 @@ class MakeCommand extends GeneratorCommand */ protected $type = 'Page'; + /** + * The console command name aliases. + * + * @var array + */ + protected $aliases = ['make:folio']; + /** * Get the destination view path. * diff --git a/tests/Feature/Console/MakeCommandTest.php b/tests/Feature/Console/MakeCommandTest.php index db7b4ba..19262d1 100644 --- a/tests/Feature/Console/MakeCommandTest.php +++ b/tests/Feature/Console/MakeCommandTest.php @@ -7,7 +7,7 @@ }); it('makes routes', function (string $name, string $path) { - $this->artisan('make:folio', ['name' => $name])->assertOk(); + $this->artisan('folio:page', ['name' => $name])->assertOk(); $path = resource_path('views/pages/'.$path);