From 3e0b6d286db4c4525bf7562228a2af918fc7ec74 Mon Sep 17 00:00:00 2001 From: Kobe Date: Thu, 24 Mar 2022 17:45:46 +0100 Subject: [PATCH] fixed lang publishing for laravel 9 --- src/GoogleAuthenticateServiceProvider.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/GoogleAuthenticateServiceProvider.php b/src/GoogleAuthenticateServiceProvider.php index 9d4d115..63f15c7 100755 --- a/src/GoogleAuthenticateServiceProvider.php +++ b/src/GoogleAuthenticateServiceProvider.php @@ -66,12 +66,16 @@ protected function bootForConsole() { // Publishing the views $this->publishes([ - __DIR__.'/../resources/views' => base_path('resources/views/vendor/google-authenticate'), + __DIR__.'/../resources/views' => resource_path('views/vendor/google-authenticate'), ], 'views'); //publish the translations + $langPath = 'vendor/google-authenticate'; + $langPath = (function_exists('lang_path')) + ? lang_path($langPath) + : resource_path('lang/'.$langPath); $this->publishes([ - __DIR__.'/../resources/lang' => resource_path('lang/vendor/google-authenticate'), + __DIR__.'/../resources/lang' => $langPath, ], 'lang'); //publishes config file