3
3
namespace Joselfonseca \LaravelTactician \Providers ;
4
4
5
5
use Illuminate \Support \ServiceProvider ;
6
+ use Joselfonseca \LaravelTactician \Commands \MakeTacticianCommand ;
7
+ use Joselfonseca \LaravelTactician \Commands \MakeTacticianCommandCommand ;
8
+ use Joselfonseca \LaravelTactician \Commands \MakeTacticianHandlerCommand ;
6
9
7
10
/**
8
11
* Class LaravelTacticianServiceProvider
@@ -23,6 +26,24 @@ public function register()
23
26
$ this ->app ->bind ('League\Tactician\Handler\MethodNameInflector\MethodNameInflector ' , config ('laravel-tactician.inflector ' ));
24
27
$ this ->app ->bind ('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor ' , config ('laravel-tactician.extractor ' ));
25
28
$ this ->app ->bind ('Joselfonseca\LaravelTactician\CommandBusInterface ' , config ('laravel-tactician.bus ' ));
29
+
30
+ // Register Command Generator
31
+ $ this ->app ->singleton ('laravel-tactician.make.command ' , function ($ app ) {
32
+ return new MakeTacticianCommandCommand ($ app ['files ' ]);
33
+ });
34
+ $ this ->commands ('laravel-tactician.make.command ' );
35
+
36
+ // Register Handler Generator
37
+ $ this ->app ->singleton ('laravel-tactician.make.handler ' , function ($ app ) {
38
+ return new MakeTacticianHandlerCommand ($ app ['files ' ]);
39
+ });
40
+ $ this ->commands ('laravel-tactician.make.handler ' );
41
+
42
+ // Register Comman+Handler Generator Command
43
+ $ this ->app ->singleton ('laravel-tactician.make.tactician ' , function () {
44
+ return new MakeTacticianCommand ();
45
+ });
46
+ $ this ->commands ('laravel-tactician.make.tactician ' );
26
47
}
27
48
28
49
/**
0 commit comments