Skip to content

Commit 0a4cde6

Browse files
author
Magnus Boye
authored
Update WeatherServiceProvider.php
1 parent 9ce8d4a commit 0a4cde6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/WeatherServiceProvider.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
class WeatherServiceProvider extends ServiceProvider {
88

99
public function boot() {
10-
11-
$this->publishes(
12-
[
13-
__DIR__ . '/../config/weather.php' => config_path('weather.php')
14-
],
15-
'weather-config'
16-
);
10+
if ($this->app->runningInConsole()) {
11+
$this->publishes(
12+
[
13+
__DIR__ . '/../config/weather.php' => config_path('weather.php')
14+
],
15+
'weather-config'
16+
);
17+
}
1718
}
1819

1920
public function register() {
2021
$this->mergeConfigFrom(__DIR__ . '/../config/weather.php', 'weather');
22+
$this->registerFacades();
2123
}
2224

2325
/**
@@ -32,4 +34,4 @@ function ($app) {
3234
return new Weather();
3335
});
3436
}
35-
}
37+
}

0 commit comments

Comments
 (0)