Skip to content

Commit 6fe4d45

Browse files
Even more cleaning up of the service provider
1 parent 4bc9819 commit 6fe4d45

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

src/ServiceProvider.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,24 @@ public function boot()
1818
{
1919
parent::boot();
2020

21-
// Views
2221
$this->loadViewsFrom(__DIR__ . '/../resources/views/', 'howToAddon');
23-
24-
// Config
2522
$this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'howToAddon');
26-
27-
$this->publishes([
28-
__DIR__ . '/../config/config.php' => config_path('how_to_addon.php'),
29-
], 'How To Addon config file');
30-
31-
// Translations
3223
$this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'howToAddon');
3324

34-
$this->publishes([
35-
__DIR__.'/../resources/lang' => resource_path('lang/vendor/jonassiewertsen/howToAddon/'),
36-
], 'How To Addon lang file');
25+
if ($this->app->runningInConsole()) {
26+
$this->publishes([
27+
__DIR__.'/../resources/lang' => resource_path('lang/vendor/jonassiewertsen/howToAddon/'),
28+
], 'How To Addon lang file');
29+
30+
$this->publishes([
31+
__DIR__ . '/../config/config.php' => config_path('how_to_addon.php'),
32+
], 'How To Addon config file');
33+
}
3734

38-
// Commands
3935
$this->loadCommands([
4036
Setup::class,
4137
]);
4238

43-
// Navigation
4439
$this->createNavigation();
4540
}
4641

0 commit comments

Comments
 (0)