Skip to content

Commit c1245b1

Browse files
[3.x] Add part for channel name changes (#55)
* Add part for channel name changes * Update UPGRADE.md Co-authored-by: Taylor Otwell <[email protected]>
1 parent 05555e4 commit c1245b1

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

UPGRADE.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If you were depending on functionality from `nexmo/laravel` you may now use it d
3838
```php
3939
use Vonage\Client;
4040

41-
$vonageClient = app()->make(Client::class);
41+
$vonageClient = app(Client::class);
4242
```
4343

4444
If you were using the `Nexmo` facade from `nexmo/laravel`, you should update your code to use the `Vonage` facade instead:
@@ -81,6 +81,29 @@ VONAGE_SMS_FROM=15556666666
8181

8282
Once you have defined this environment variable, you may remove the `nexmo` configuration entry from your `services` configuration file.
8383

84+
### Notification Channel Name
85+
86+
The notification channel's name has been updated to `vonage`. Therefore, you should update all `nexmo` channel references in the `via` methods of your notifications to `vonage`:
87+
88+
```php
89+
/**
90+
* Get the notification's delivery channels.
91+
*
92+
* @param mixed $notifiable
93+
* @return array
94+
*/
95+
public function via($notifiable)
96+
{
97+
return $notifiable->prefers_sms ? ['vonage'] : ['mail', 'database'];
98+
}
99+
```
100+
101+
In addition, any ad-hoc notifications that were previously routing via `nexmo` should have their routing updated to `vonage`:
102+
103+
```php
104+
Notification::route('vonage', '5555555555')->notify(new InvoicePaid($invoice));
105+
```
106+
84107
### Class / Method Renaming
85108

86109
All references to Nexmo have been updated to Vonage, including class names and method names.

0 commit comments

Comments
 (0)