1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Created by PhpStorm. |
4
|
|
|
* User: arthur |
5
|
|
|
* Date: 09.03.19 |
6
|
|
|
* Time: 18:23. |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
namespace Foundation\Generator\Providers; |
10
|
|
|
|
11
|
|
|
use Foundation\Generator\Commands\CommandMakeCommand; |
12
|
|
|
use Foundation\Generator\Commands\ControllerMakeCommand; |
13
|
|
|
use Foundation\Generator\Commands\EventMakeCommand; |
14
|
|
|
use Foundation\Generator\Commands\FactoryMakeCommand; |
15
|
|
|
use Foundation\Generator\Commands\JobMakeCommand; |
16
|
|
|
use Foundation\Generator\Commands\ListenerMakeCommand; |
17
|
|
|
use Foundation\Generator\Commands\MiddlewareMakeCommand; |
18
|
|
|
use Foundation\Generator\Commands\MigrationMakeCommand; |
19
|
|
|
use Foundation\Generator\Commands\NotificationMakeCommand; |
20
|
|
|
use Foundation\Generator\Commands\ProviderMakeCommand; |
21
|
|
|
use Foundation\Generator\Events\FileGeneratedEvent; |
22
|
|
|
use Foundation\Generator\Listeners\CreateGeneratedFile; |
23
|
|
|
use Illuminate\Support\ServiceProvider; |
24
|
|
|
|
25
|
|
|
class GeneratorServiceProvider extends ServiceProvider |
26
|
|
|
{ |
27
|
|
|
protected $commands = [ |
28
|
|
|
FactoryMakeCommand::class, |
29
|
|
|
CommandMakeCommand::class, |
30
|
|
|
ControllerMakeCommand::class, |
31
|
|
|
EventMakeCommand::class, |
32
|
|
|
JobMakeCommand::class, |
33
|
|
|
ListenerMakeCommand::class, |
34
|
|
|
MiddlewareMakeCommand::class, |
35
|
|
|
MigrationMakeCommand::class, |
36
|
|
|
ProviderMakeCommand::class, |
37
|
|
|
NotificationMakeCommand::class |
38
|
|
|
]; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Boot the application events. |
42
|
|
|
* |
43
|
|
|
* @return void |
44
|
|
|
*/ |
45
|
102 |
|
public function boot() |
46
|
|
|
{ |
47
|
102 |
|
\Event::listen(FileGeneratedEvent::class, CreateGeneratedFile::class); |
48
|
102 |
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Register the service provider. |
52
|
|
|
* |
53
|
|
|
* @return void |
54
|
|
|
*/ |
55
|
102 |
|
public function register() |
56
|
|
|
{ |
57
|
102 |
|
$this->commands($this->commands); |
58
|
|
|
|
59
|
102 |
|
} |
60
|
|
|
} |
61
|
|
|
|