Conditions | 2 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function boot() |
||
34 | { |
||
35 | |||
36 | // Pusblish assets |
||
37 | $this->publishes([ |
||
38 | |||
39 | __DIR__.'/config/pushmix.php' => config_path('pushmix.php'), |
||
40 | __DIR__.'/views' => resource_path('views/vendor/pushmix'), |
||
41 | __DIR__.'/js' => public_path(), |
||
42 | |||
43 | ], 'pushmix'); |
||
44 | |||
45 | // Clear Config Cache |
||
46 | Artisan::call('config:clear'); |
||
47 | |||
48 | $this->app->when(PushmixChannel::class) |
||
49 | ->needs(PushmixClient::class) |
||
50 | ->give(function () { |
||
51 | if (is_null(config('pushmix.subscription_id', null))) { |
||
52 | throw InvalidConfiguration::configurationNotSet(); |
||
53 | } |
||
54 | |||
55 | return new PushmixClient(); |
||
56 | }); |
||
73 |