1 | <?php |
||
7 | class SupportServiceProvider extends ServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Bootstrap the application services. |
||
11 | */ |
||
12 | public function boot() |
||
13 | { |
||
14 | // |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Register the application services. |
||
19 | */ |
||
20 | public function register() |
||
21 | { |
||
22 | $this->registerCrudGeneratorCommand(); |
||
23 | $this->registerGitlabGeneratorCommand(); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Get the services provided by the provider. |
||
28 | * |
||
29 | * @return array |
||
30 | */ |
||
31 | public function provides() |
||
32 | { |
||
33 | return []; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Register CRUD generator command. |
||
38 | */ |
||
39 | private function registerCrudGeneratorCommand() |
||
40 | { |
||
41 | $this->app['support:make:crud'] = $this->app->share(function () { |
||
42 | return new Commands\CrudGenerate(); |
||
43 | }); |
||
44 | |||
45 | $this->commands('support:make:crud'); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * Register GitLab generator command. |
||
50 | */ |
||
51 | private function registerGitlabGeneratorCommand() |
||
52 | { |
||
53 | $this->app['support:make:gitlab'] = $this->app->share(function () { |
||
54 | return new Commands\GitlabGenerate(); |
||
55 | }); |
||
56 | |||
57 | $this->commands('support:make:gitlab'); |
||
58 | } |
||
59 | } |
||
60 |