From 0a4cde6e73f2277358cd7b57290e0578e645e33e Mon Sep 17 00:00:00 2001 From: Magnus Boye Date: Fri, 31 Jul 2020 09:49:20 +0200 Subject: [PATCH] Update WeatherServiceProvider.php --- src/WeatherServiceProvider.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/WeatherServiceProvider.php b/src/WeatherServiceProvider.php index 3b66b70..4c994c3 100644 --- a/src/WeatherServiceProvider.php +++ b/src/WeatherServiceProvider.php @@ -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(); } /** @@ -32,4 +34,4 @@ function ($app) { return new Weather(); }); } -} \ No newline at end of file +}