Skip to content

Commit 1c4493b

Browse files
committed
Register command
1 parent 672f50c commit 1c4493b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/AlgoServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Foxws\Algos;
44

5+
use Foxws\LaravelAlgos\Commands\MakeAlgo;
56
use Spatie\LaravelPackageTools\Package;
67
use Spatie\LaravelPackageTools\PackageServiceProvider;
78

@@ -11,7 +12,10 @@ public function configurePackage(Package $package): void
1112
{
1213
$package
1314
->name('laravel-algos')
14-
->hasConfigFile('algos');
15+
->hasConfigFile('algos')
16+
->hasCommands([
17+
MakeAlgo::class,
18+
]);
1519
}
1620

1721
public function packageRegistered(): void

src/Commands/MakeAlgo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use Illuminate\Console\GeneratorCommand;
66
use Symfony\Component\Console\Input\InputArgument;
77

8-
class MakeWorkflow extends GeneratorCommand
8+
class MakeAlgo extends GeneratorCommand
99
{
1010
protected $name = 'make:algo';
1111

1212
protected $description = 'Create a new algo class';
1313

14-
protected $type = 'Action';
14+
protected $type = 'Algo';
1515

1616
protected function getStub(): string
1717
{

0 commit comments

Comments
 (0)