Skip to content

Commit 1cb08d5

Browse files
committed
fix: update provider
1 parent 46e2ce4 commit 1cb08d5

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

config/telegram-git-notifier.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
<?php
22

33
return [
4+
'defaults' => [
5+
'paths' => [
6+
'view' => env(
7+
'TGN_DEFAULT_PATH_VIEW',
8+
base_path('resources/views/vendor/telegram-git-notifier')
9+
),
10+
],
11+
],
12+
413
'app' => [
514
'name' => env('TGN_APP_NAME', 'Laravel Telegram Git Notifier'),
615

src/Providers/TelegramGitNotifierServiceProvider.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ class TelegramGitNotifierServiceProvider extends ServiceProvider
1313
*/
1414
public function boot(): void
1515
{
16-
$configPath = __DIR__.'/../../config/telegram-git-notifier.php';
17-
$this->publishes([
18-
$configPath => config_path('telegram-git-notifier.php'),
19-
], 'config');
20-
2116
$routePath = __DIR__.'/../../routes/bot.php';
2217
if (file_exists($routePath)) {
2318
$this->loadRoutesFrom($routePath);
@@ -28,11 +23,16 @@ public function boot(): void
2823
$this->loadViewsFrom($viewPath, 'telegram-git-notifier');
2924
}
3025

26+
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'telegram-git-notifier');
27+
28+
$configPath = __DIR__.'/../../config/telegram-git-notifier.php';
3129
$this->publishes([
32-
__DIR__.'/../../resources/views' => base_path('resources/views/vendor/telegram-git-notifier'),
33-
], 'views');
30+
$configPath => config_path('telegram-git-notifier.php'),
31+
], 'config');
3432

35-
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'telegram-git-notifier');
33+
$this->publishes([
34+
__DIR__.'/../../resources/views' => config('telegram-git-notifier.defaults.paths.views'),
35+
], 'views');
3636

3737
$this->publishes([
3838
__DIR__.'/../../lang' => resource_path('lang/vendor/telegram-git-notifier'),

0 commit comments

Comments
 (0)