Skip to content

Commit

Permalink
Merge pull request #141 from toplan/dev
Browse files Browse the repository at this point in the history
fixbug
  • Loading branch information
toplan authored Mar 27, 2017
2 parents 1652e59 + 5b5a0f6 commit 0ff7922
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "toplan/laravel-sms",
"description": "A mobile phone number validation solution based on laravel",
"license": "MIT",
"version": "2.6.1",
"version": "2.6.2",
"keywords": ["sms", "mobile", "phone", "laravel", "laravel-sms"],
"authors": [
{
Expand Down
17 changes: 3 additions & 14 deletions src/Toplan/LaravelSms/SmsManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ class SmsManagerServiceProvider extends ServiceProvider
{
use DispatchesJobs;

/**
* 懒加载
*
* @var bool
*/
protected $defer = true;

/**
* 启动服务
*/
Expand All @@ -43,13 +36,9 @@ public function boot()
*/
public function register()
{
$this->mergeConfigFrom(
__DIR__ . '/../../config/laravel-sms.php', 'laravel-sms'
);
$this->mergeConfigFrom(__DIR__ . '/../../config/laravel-sms.php', 'laravel-sms');

$this->app->singleton([
'Toplan\\Sms\\SmsManager' => 'laravel-sms',
], function ($app) {
$this->app->singleton('Toplan\\Sms\\SmsManager', function ($app) {
$token = $app->request->header('access-token', null);
if (empty($token)) {
$token = $app->request->input('access_token', null);
Expand Down Expand Up @@ -121,6 +110,6 @@ protected function phpSms()
*/
public function provides()
{
return ['laravel-sms', 'Toplan\\Sms\\SmsManager'];
return ['Toplan\\Sms\\SmsManager'];
}
}

0 comments on commit 0ff7922

Please sign in to comment.