Skip to content

Commit

Permalink
Update WeatherServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Boye committed Jul 31, 2020
1 parent 9ce8d4a commit 0a4cde6
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/WeatherServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@
class WeatherServiceProvider extends ServiceProvider {

public function boot() {

$this->publishes(
[
__DIR__ . '/../config/weather.php' => config_path('weather.php')
],
'weather-config'
);
if ($this->app->runningInConsole()) {
$this->publishes(
[
__DIR__ . '/../config/weather.php' => config_path('weather.php')
],
'weather-config'
);
}
}

public function register() {
$this->mergeConfigFrom(__DIR__ . '/../config/weather.php', 'weather');
$this->registerFacades();
}

/**
Expand All @@ -32,4 +34,4 @@ function ($app) {
return new Weather();
});
}
}
}

0 comments on commit 0a4cde6

Please sign in to comment.