From dd34051601bf2338bb69389b2496e698b9917849 Mon Sep 17 00:00:00 2001 From: Chris Tankersley Date: Mon, 16 Sep 2019 23:18:19 -0400 Subject: [PATCH] Switched to nexmo/laravel, bumped to newest version --- composer.json | 2 +- src/NexmoChannelServiceProvider.php | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index b838216..eef19e7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": "^7.1.3", "illuminate/notifications": "~5.8.0|^6.0|^7.0", - "nexmo/client": "^1.0|^2.0" + "nexmo/laravel": "^2.0" }, "require-dev": { "mockery/mockery": "^1.0", diff --git a/src/NexmoChannelServiceProvider.php b/src/NexmoChannelServiceProvider.php index 6d34fbd..02e18d3 100644 --- a/src/NexmoChannelServiceProvider.php +++ b/src/NexmoChannelServiceProvider.php @@ -5,7 +5,6 @@ use Illuminate\Support\Facades\Notification; use Illuminate\Support\ServiceProvider; use Nexmo\Client as NexmoClient; -use Nexmo\Client\Credentials\Basic as NexmoCredentials; class NexmoChannelServiceProvider extends ServiceProvider { @@ -19,10 +18,7 @@ public function register() Notification::resolved(function (ChannelManager $service) { $service->extend('nexmo', function ($app) { return new Channels\NexmoSmsChannel( - new NexmoClient(new NexmoCredentials( - $this->app['config']['services.nexmo.key'], - $this->app['config']['services.nexmo.secret'] - )), + $this->app->make(NexmoClient::class), $this->app['config']['services.nexmo.sms_from'] ); });