Skip to content

Commit

Permalink
feat: bind VonageSmsChannel to container (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 authored Oct 12, 2022
1 parent d828ba1 commit f073101
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/VonageChannelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ public function register()
return Vonage::make($app['config']['vonage'], $httpClient)->client();
});

$this->app->bind(VonageSmsChannel::class, function ($app) {
return new VonageSmsChannel(
$app->make(Client::class),
$app['config']['vonage.sms_from']
);
});

Notification::resolved(function (ChannelManager $service) {
$service->extend('vonage', function ($app) {
return new VonageSmsChannel(
$app->make(Client::class),
$app['config']['vonage.sms_from']
);
return $app->make(VonageSmsChannel::class);
});
});
}
Expand Down

0 comments on commit f073101

Please sign in to comment.