From e29474a0ca60f6b258c882b4b6c030e9df7c1b77 Mon Sep 17 00:00:00 2001 From: Kristof Date: Wed, 13 Mar 2024 08:27:29 +0100 Subject: [PATCH] Updated for Laravel 11 --- changelog.md | 4 ++++ composer.json | 6 +++--- readme.md | 8 ++++---- src/GoogleAuthenticateServiceProvider.php | 8 ++++---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/changelog.md b/changelog.md index b5588f4..efe11e5 100755 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ # Changelog All notable changes to `GoogleAuthenticator` will be documented in this file. + +## Version 4.3.0 +- Added support for Laravel 11 +- Updated group names for publishing config/views/etc ## Version 4.2.0 - Added support for Laravel 10 - Added return types diff --git a/composer.json b/composer.json index 7629f16..a7968de 100755 --- a/composer.json +++ b/composer.json @@ -16,12 +16,12 @@ "homepage": "https://github.com/statikbe/laravel-google-authenticate", "keywords": ["Laravel", "google", "authenticate", "socialite"], "require": { - "illuminate/support": "^9.0|^10.0", - "illuminate/routing": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "illuminate/routing": "^9.0|^10.0|^11.0", "laravel/socialite": "^5.6" }, "suggest": { - "doctrine/dbal": "If you are using the provided migration you will need doctrine/dbal." + "doctrine/dbal": "If you are using the provided migration you will need doctrine/dbal. You won't need this in Laravel versions >= 11" }, "autoload": { "psr-4": { diff --git a/readme.md b/readme.md index ef13e6e..a2fd12a 100755 --- a/readme.md +++ b/readme.md @@ -28,7 +28,7 @@ The package will automatically register itself. You can publish the migration with the following command: ``` shell -php artisan vendor:publish --provider="Statikbe\GoogleAuthenticate\GoogleAuthenticateServiceProvider" --tag="migrations" +php artisan vendor:publish --provider="Statikbe\GoogleAuthenticate\GoogleAuthenticateServiceProvider" --tag="google-migrations" ``` To add the needed columns to your database run: @@ -65,7 +65,7 @@ Finally, you can add google login route to your login and register views: `{{ ro Publish the config file ```bash -php artisan vendor:publish --provider="Statikbe\\GoogleAuthenticate\\GoogleAuthenticateServiceProvider" --tag="config" +php artisan vendor:publish --provider="Statikbe\\GoogleAuthenticate\\GoogleAuthenticateServiceProvider" --tag="google-config" ``` #### Email domains @@ -112,11 +112,11 @@ For example in your config: ## Publishing You can publish the views and translations files using: ``` shell -php artisan vendor:publish --provider="Statikbe\\GoogleAuthenticate\\GoogleAuthenticateServiceProvider" --tag="views" +php artisan vendor:publish --provider="Statikbe\\GoogleAuthenticate\\GoogleAuthenticateServiceProvider" --tag="google-views" ``` and ``` shell -php artisan vendor:publish --provider="Statikbe\\GoogleAuthenticate\\GoogleAuthenticateServiceProvider" --tag="lang" +php artisan vendor:publish --provider="Statikbe\\GoogleAuthenticate\\GoogleAuthenticateServiceProvider" --tag="google-lang" ``` ## Security diff --git a/src/GoogleAuthenticateServiceProvider.php b/src/GoogleAuthenticateServiceProvider.php index 25d00a6..d0cf7d2 100755 --- a/src/GoogleAuthenticateServiceProvider.php +++ b/src/GoogleAuthenticateServiceProvider.php @@ -17,7 +17,7 @@ public function boot(): void $this->publishes([ __DIR__ . '/../database/migrations/add_google_provider_to_user_table.php.stub' => database_path('migrations/' . date('Y_m_d_His', time()) . '_add_google_provider_to_user_table.php'), - ], 'migrations'); + ], 'google-migrations'); //loaders $this->loadRoutesFrom(__DIR__ . '/routes.php'); @@ -67,7 +67,7 @@ protected function bootForConsole(): void // Publishing the views $this->publishes([ __DIR__ . '/../resources/views' => resource_path('views/vendor/google-authenticate'), - ], 'views'); + ], 'google-views'); //publish the translations $langPath = 'vendor/google-authenticate'; @@ -76,11 +76,11 @@ protected function bootForConsole(): void : resource_path('lang/' . $langPath); $this->publishes([ __DIR__ . '/../resources/lang' => $langPath, - ], 'lang'); + ], 'google-lang'); //publishes config file $this->publishes([ __DIR__ . '/config/google-authenticate.php' => config_path('google-authenticate.php'), - ], 'config'); + ], 'google-config'); } } \ No newline at end of file