From 1b5bc5b8559084cb84fa2c9d4eca8fd906e315db Mon Sep 17 00:00:00 2001 From: Roy Duineveld Date: Wed, 3 Aug 2022 16:07:56 +0200 Subject: [PATCH 1/3] Configurable queue --- src/App/Notifications/SendVerificationCodeEmail.php | 12 ++++++++++++ src/config/laravel2step.php | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/src/App/Notifications/SendVerificationCodeEmail.php b/src/App/Notifications/SendVerificationCodeEmail.php index c18e4b9..470b0f0 100644 --- a/src/App/Notifications/SendVerificationCodeEmail.php +++ b/src/App/Notifications/SendVerificationCodeEmail.php @@ -35,6 +35,18 @@ public function via($notifiable) return ['mail']; } + /** + * Determine which queues should be used for each notification channel. + * + * @return array + */ + public function viaQueues() + { + return [ + 'mail' => config('laravel2step.laravel2stepEmailQueue'), + ]; + } + /** * Get the mail representation of the notification. * diff --git a/src/config/laravel2step.php b/src/config/laravel2step.php index 765060a..742e600 100644 --- a/src/config/laravel2step.php +++ b/src/config/laravel2step.php @@ -59,4 +59,12 @@ 'laravel2stepBootstrapCssCdn' => env('LARAVEL_2STEP_BOOTSTRAP_CSS_CDN', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'), 'laravel2stepCssFile' => env('LARAVEL_2STEP_CSS_FILE', 'css/laravel2step/app.css'), + /* + |-------------------------------------------------------------------------- + | Verification Email Queue + |-------------------------------------------------------------------------- + */ + + 'laravel2stepEmailQueue' => env('LARAVEL_2STEP_EMAIL_QUEUE', null), + ]; From 20acaec58d24af0d2a337bd655797f5b3e5a72a8 Mon Sep 17 00:00:00 2001 From: Roy Duineveld Date: Wed, 3 Aug 2022 16:09:40 +0200 Subject: [PATCH 2/3] =?UTF-8?q?Code=20style=20=F0=9F=99=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/laravel2step.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/laravel2step.php b/src/config/laravel2step.php index 742e600..369b120 100644 --- a/src/config/laravel2step.php +++ b/src/config/laravel2step.php @@ -65,6 +65,6 @@ |-------------------------------------------------------------------------- */ - 'laravel2stepEmailQueue' => env('LARAVEL_2STEP_EMAIL_QUEUE', null), + 'laravel2stepEmailQueue' => env('LARAVEL_2STEP_EMAIL_QUEUE', null), ]; From b4c62652f7dc25545450ca07b990508f7d2f2d74 Mon Sep 17 00:00:00 2001 From: Roy Duineveld Date: Thu, 4 Aug 2022 13:22:21 +0200 Subject: [PATCH 3/3] Laravel 9 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bb1e2b1..b326c93 100755 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^7.3|^8.0", - "laravel/framework": "6.*|7.*|8.*" + "laravel/framework": "6.*|7.*|8.*|9.*" }, "require-dev": { "orchestra/testbench": "^6.0",