From 8d1ed15df1d6751ced74c5f1b811fab72dc41982 Mon Sep 17 00:00:00 2001 From: toplan Date: Thu, 24 Mar 2016 15:56:02 +0800 Subject: [PATCH 1/3] default close sms send queue --- src/Toplan/LaravelSms/SmsManagerServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php index 7e10f9d..e734fc7 100644 --- a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php +++ b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php @@ -62,7 +62,7 @@ protected function initPhpSms() // define how to use queue $queueJob = config('laravel-sms.queueJob', 'App\Jobs\SendReminderSms'); - Sms::queue(function ($sms, $data) use ($queueJob) { + Sms::queue(false, function ($sms, $data) use ($queueJob) { if (!class_exists($queueJob)) { throw new LaravelSmsException("Class [$queueJob] does not exists."); } From e573b4c35beb1bad4c8e9b9b0a3f51aa3f5e5c2c Mon Sep 17 00:00:00 2001 From: toplan Date: Thu, 24 Mar 2016 15:56:02 +0800 Subject: [PATCH 2/3] default close sms send queue --- README.md | 2 +- src/Toplan/LaravelSms/SmsManagerServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce461d1..0828211 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ phpsms为laravel-sms提供了全套的短信发送机制,而且phpsms也有自 ###1. 启用/关闭队列 -判断当前队列状态: +`laravel-sms`已实现的短信队列默认是关闭的,判断当前队列状态: ```php $enable = PhpSms::queue();//return true of false ``` diff --git a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php index 7e10f9d..e734fc7 100644 --- a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php +++ b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php @@ -62,7 +62,7 @@ protected function initPhpSms() // define how to use queue $queueJob = config('laravel-sms.queueJob', 'App\Jobs\SendReminderSms'); - Sms::queue(function ($sms, $data) use ($queueJob) { + Sms::queue(false, function ($sms, $data) use ($queueJob) { if (!class_exists($queueJob)) { throw new LaravelSmsException("Class [$queueJob] does not exists."); } From 61687dfeb5e5634ee9be73842513714a4578db67 Mon Sep 17 00:00:00 2001 From: toplan Date: Thu, 24 Mar 2016 16:07:09 +0800 Subject: [PATCH 3/3] publish 2.2.7 --- README.md | 6 +++--- composer.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0828211..5002b85 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.6', + composer require 'toplan/laravel-sms:~2.2.7', //安装开发中版本 composer require 'toplan/laravel-sms:dev-master' @@ -170,14 +170,14 @@ php artisan queue:listen * 方式2:自定义队列流程 -在发送短信前,你可以重新定义你的队列流程哦! +在发送短信前,你可以完全重新定义你的队列流程哦! ```php //example: PhpSms::queue(function($sms, $data){ ... //假设如此推入队列: - $this->dispatch(new yourQueueJobClass($sms)); + $this->dispatch(new YourQueueJobClass($sms)); ... //请务必返回如下数据用以标记推入队列成功(否则会报错): return [ diff --git a/composer.json b/composer.json index 47a7d6c..f7f29f9 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.6", + "version": "2.2.7", "keywords": ["sms", "laravel sms", "laravel-sms"], "authors": [ {