1 | <?php |
||
7 | class ComposerSecurityCheckServiceProvider extends ServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Indicates if loading of the provider is deferred. |
||
11 | * |
||
12 | * @var bool |
||
13 | */ |
||
14 | protected $defer = true; |
||
15 | |||
16 | /** |
||
17 | * Bootstrap the application events. |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | 28 | public function boot() |
|
22 | { |
||
23 | 28 | $this->publishes([ |
|
24 | 28 | __DIR__ . '/config/composer-security-check.php' => config_path('composer-security-check.php'), |
|
25 | 28 | ], 'config'); |
|
26 | |||
27 | 28 | $this->loadViewsFrom(__DIR__ . '/views', 'composer-security-check'); |
|
28 | |||
29 | 28 | $this->publishes([ |
|
30 | 28 | __DIR__ . '/views' => base_path('resource/views/vendor/composer-security-check'), |
|
31 | ]); |
||
32 | 28 | } |
|
33 | |||
34 | /** |
||
35 | * Register the service provider. |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | 28 | public function register() |
|
40 | { |
||
41 | 28 | $this->app['command.composer-security:check'] = $this->app->share( |
|
42 | 28 | function ($app) { |
|
43 | 8 | return new ComposerSecurityCheck(new client); |
|
44 | 28 | } |
|
45 | ); |
||
46 | 28 | $this->commands('command.composer-security:check'); |
|
47 | |||
48 | 28 | } |
|
49 | |||
50 | /** |
||
51 | * Get the services provided by the provider. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public function provides() |
||
59 | } |
||
60 |