1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Nwidart\Modules\Providers; |
4
|
|
|
|
5
|
|
|
use Illuminate\Support\ServiceProvider; |
6
|
|
|
use Nwidart\Modules\Commands\CommandCommand; |
7
|
|
|
use Nwidart\Modules\Commands\ControllerCommand; |
8
|
|
|
use Nwidart\Modules\Commands\DisableCommand; |
9
|
|
|
use Nwidart\Modules\Commands\DumpCommand; |
10
|
|
|
use Nwidart\Modules\Commands\EnableCommand; |
11
|
|
|
use Nwidart\Modules\Commands\GenerateEventCommand; |
12
|
|
|
use Nwidart\Modules\Commands\GenerateJobCommand; |
13
|
|
|
use Nwidart\Modules\Commands\GenerateListenerCommand; |
14
|
|
|
use Nwidart\Modules\Commands\GenerateMailCommand; |
15
|
|
|
use Nwidart\Modules\Commands\GenerateMiddlewareCommand; |
16
|
|
|
use Nwidart\Modules\Commands\GenerateNotificationCommand; |
17
|
|
|
use Nwidart\Modules\Commands\GenerateProviderCommand; |
18
|
|
|
use Nwidart\Modules\Commands\GenerateRouteProviderCommand; |
19
|
|
|
use Nwidart\Modules\Commands\InstallCommand; |
20
|
|
|
use Nwidart\Modules\Commands\ListCommand; |
21
|
|
|
use Nwidart\Modules\Commands\MakeCommand; |
22
|
|
|
use Nwidart\Modules\Commands\MakeRequestCommand; |
23
|
|
|
use Nwidart\Modules\Commands\MigrateCommand; |
24
|
|
|
use Nwidart\Modules\Commands\MigrateRefreshCommand; |
25
|
|
|
use Nwidart\Modules\Commands\MigrateResetCommand; |
26
|
|
|
use Nwidart\Modules\Commands\MigrateRollbackCommand; |
27
|
|
|
use Nwidart\Modules\Commands\MigrationCommand; |
28
|
|
|
use Nwidart\Modules\Commands\ModelCommand; |
29
|
|
|
use Nwidart\Modules\Commands\PublishCommand; |
30
|
|
|
use Nwidart\Modules\Commands\PublishConfigurationCommand; |
31
|
|
|
use Nwidart\Modules\Commands\PublishMigrationCommand; |
32
|
|
|
use Nwidart\Modules\Commands\PublishTranslationCommand; |
33
|
|
|
use Nwidart\Modules\Commands\SeedCommand; |
34
|
|
|
use Nwidart\Modules\Commands\SeedMakeCommand; |
35
|
|
|
use Nwidart\Modules\Commands\SetupCommand; |
36
|
|
|
use Nwidart\Modules\Commands\UpdateCommand; |
37
|
|
|
use Nwidart\Modules\Commands\UseCommand; |
38
|
|
|
|
39
|
|
|
class ConsoleServiceProvider extends ServiceProvider |
40
|
|
|
{ |
41
|
|
|
protected $defer = false; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* The available commands |
45
|
|
|
* |
46
|
|
|
* @var array |
47
|
|
|
*/ |
48
|
|
|
protected $commands = [ |
49
|
|
|
MakeCommand::class, |
50
|
|
|
CommandCommand::class, |
51
|
|
|
ControllerCommand::class, |
52
|
|
|
DisableCommand::class, |
53
|
|
|
EnableCommand::class, |
54
|
|
|
GenerateEventCommand::class, |
55
|
|
|
GenerateListenerCommand::class, |
56
|
|
|
GenerateMiddlewareCommand::class, |
57
|
|
|
GenerateProviderCommand::class, |
58
|
|
|
GenerateRouteProviderCommand::class, |
59
|
|
|
InstallCommand::class, |
60
|
|
|
ListCommand::class, |
61
|
|
|
MigrateCommand::class, |
62
|
|
|
MigrateRefreshCommand::class, |
63
|
|
|
MigrateResetCommand::class, |
64
|
|
|
MigrateRollbackCommand::class, |
65
|
|
|
MigrationCommand::class, |
66
|
|
|
ModelCommand::class, |
67
|
|
|
PublishCommand::class, |
68
|
|
|
PublishMigrationCommand::class, |
69
|
|
|
PublishTranslationCommand::class, |
70
|
|
|
SeedCommand::class, |
71
|
|
|
SeedMakeCommand::class, |
72
|
|
|
SetupCommand::class, |
73
|
|
|
UpdateCommand::class, |
74
|
|
|
UseCommand::class, |
75
|
|
|
DumpCommand::class, |
76
|
|
|
MakeRequestCommand::class, |
77
|
|
|
PublishConfigurationCommand::class, |
78
|
|
|
GenerateJobCommand::class, |
79
|
|
|
GenerateMailCommand::class, |
80
|
|
|
GenerateNotificationCommand::class, |
81
|
|
|
]; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Register the commands. |
85
|
|
|
*/ |
86
|
115 |
|
public function register() |
87
|
|
|
{ |
88
|
115 |
|
$this->commands($this->commands); |
89
|
115 |
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return array |
93
|
|
|
*/ |
94
|
|
|
public function provides() |
95
|
|
|
{ |
96
|
|
|
$provides = $this->commands; |
97
|
|
|
|
98
|
|
|
return $provides; |
99
|
|
|
} |
100
|
|
|
} |
101
|
|
|
|