Skip to content

Commit

Permalink
Merge pull request #65 from toplan/dev
Browse files Browse the repository at this point in the history
use phpsms v1.3.0 to fix issue #59
  • Loading branch information
toplan committed Apr 15, 2016
2 parents 7fccd5d + 88b8e29 commit 1278f2b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ phpsms为laravel-sms提供了全套的短信发送机制,而且phpsms也有自
# 安装
在项目根目录下运行如下composer命令:
```php
//安装2.2版本(推荐)
composer require 'toplan/laravel-sms:~2.2.7',
//安装2.3版本(推荐)
composer require 'toplan/laravel-sms:~2.3.0',

//安装开发中版本
composer require 'toplan/laravel-sms:dev-master'
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "toplan/laravel-sms",
"description": "sms send package for laravel",
"license": "MIT",
"version": "2.2.7",
"version": "2.3.0",
"keywords": ["sms", "laravel sms", "laravel-sms"],
"authors": [
{
Expand All @@ -12,7 +12,7 @@
],
"require": {
"php": ">=5.4.0",
"toplan/phpsms": "~1.2.2"
"toplan/phpsms": "~1.3.0"
},
"autoload": {
"classmap": [
Expand Down
8 changes: 4 additions & 4 deletions src/Toplan/LaravelSms/SmsManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use DB;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Support\ServiceProvider;
use Toplan\PhpSms\Sms;
use PhpSms as PS;

class SmsManagerServiceProvider extends ServiceProvider
{
Expand Down Expand Up @@ -64,7 +64,7 @@ protected function initPhpSms()

// define how to use queue
$queueJob = config('laravel-sms.queueJob', 'App\Jobs\SendReminderSms');
Sms::queue(false, function ($sms, $data) use ($queueJob) {
PS::queue(false, function ($sms, $data) use ($queueJob) {
if (!class_exists($queueJob)) {
throw new LaravelSmsException("Class [$queueJob] does not exists.");
}
Expand All @@ -78,7 +78,7 @@ protected function initPhpSms()

// before send hook
// store sms data to database
Sms::beforeSend(function ($task) {
PS::beforeSend(function ($task) {
if (!config('laravel-sms.database_enable', false)) {
return true;
}
Expand All @@ -97,7 +97,7 @@ protected function initPhpSms()

// after send hook
// update sms data in database
Sms::afterSend(function ($task, $result) {
PS::afterSend(function ($task, $result) {
if (!config('laravel-sms.database_enable', false)) {
return true;
}
Expand Down

0 comments on commit 1278f2b

Please sign in to comment.