Skip to content

Commit c6cc661

Browse files
committed
chore: change the namespace for provider loading
1 parent 593c3cd commit c6cc661

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

config/telegram-git-notifier.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
return [
44
'defaults' => [
55
'paths' => [
6-
'view' => env(
6+
'views' => env(
77
'TGN_DEFAULT_PATH_VIEW',
8-
base_path('resources/views/vendor/telegram-git-notifier')
8+
base_path('resources/views/vendor/tg-notifier')
99
),
1010
],
1111
],
@@ -14,7 +14,7 @@
1414
'name' => env('TGN_APP_NAME', 'Laravel Telegram Git Notifier'),
1515

1616
// Required for the bot to work properly
17-
'url' => env('TGN_APP_URL', 'http://localhost:8000'),
17+
'url' => env('TGN_APP_URL', 'http://localhost:8000/telegram-git-notifier'),
1818
'timezone' => env('TIMEZONE', 'Asia/Ho_Chi_Minh'),
1919
],
2020

@@ -69,11 +69,11 @@
6969

7070
/** Set the path to the view file */
7171
'view' => [
72-
'namespace' => env('TGN_VIEW_NAMESPACE', 'telegram-git-notifier').'::',
72+
'namespace' => env('TGN_VIEW_NAMESPACE', 'tg-notifier'),
7373

7474
'default' => env(
7575
'TGN_VIEW_DEFAULT',
76-
base_path('resources/views/vendor/telegram-git-notifier')
76+
base_path('resources/views/vendor/tg-notifier')
7777
),
7878

7979
'event' => [

src/Providers/TelegramGitNotifierServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public function boot(): void
2020

2121
$viewPath = __DIR__.'/../../resources/views';
2222
if (file_exists($viewPath)) {
23-
$this->loadViewsFrom($viewPath, 'telegram-git-notifier');
23+
$this->loadViewsFrom($viewPath, config('telegram-git-notifier.view.namespace'));
2424
}
2525

26-
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'telegram-git-notifier');
26+
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'tg-notifier');
2727

2828
$configPath = __DIR__.'/../../config/telegram-git-notifier.php';
2929
$this->publishes([
@@ -35,7 +35,7 @@ public function boot(): void
3535
], 'views');
3636

3737
$this->publishes([
38-
__DIR__.'/../../lang' => resource_path('lang/vendor/telegram-git-notifier'),
38+
__DIR__.'/../../lang' => resource_path('lang/vendor/tg-notifier'),
3939
], 'lang');
4040
}
4141

0 commit comments

Comments
 (0)