diff --git a/README.md b/README.md index fa32e5a..5b7d057 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ phpsms为laravel-sms提供了全套的短信发送机制,而且phpsms也有自 在项目根目录下运行如下composer命令: ```php //安装2.2版本(推荐) - composer require 'toplan/laravel-sms:~2.2.0', + composer require 'toplan/laravel-sms:~2.2.1', //安装开发中版本 composer require 'toplan/laravel-sms:dev-master' @@ -271,7 +271,7 @@ scheme://your-domain.com/sms/voice-verify ]); if ($validator->fails()) { //验证失败后建议清空存储的短信发送信息,防止用户重复试错 - \SmsManager::forgetSentInfo($uuid) + \SmsManager::forgetSentInfo($uuid); return redirect()->back()->withErrors($validator); } ``` diff --git a/composer.json b/composer.json index d5497bd..35887f3 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "toplan/laravel-sms", "description": "sms send package for laravel", "license": "MIT", - "version": "2.2.0", + "version": "2.2.1", "keywords": ["sms", "laravel sms", "laravel-sms"], "authors": [ { diff --git a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php index 93bf7f3..57fc4f7 100644 --- a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php +++ b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php @@ -62,10 +62,10 @@ protected function initPhpSms() // define how to use queue $queueJob = config('laravel-sms.queueJob', 'App\Jobs\SendReminderSms'); - if (!class_exists($queueJob)) { - throw new LaravelSmsException("Class [$queueJob] does not exists."); - } Sms::queue(function($sms, $data) use ($queueJob){ + if (!class_exists($queueJob)) { + throw new LaravelSmsException("Class [$queueJob] does not exists."); + } $this->dispatch(new $queueJob($sms)); return [ 'success' => true,