Skip to content

Commit

Permalink
[3.x] Add part for channel name changes (#55)
Browse files Browse the repository at this point in the history
* Add part for channel name changes

* Update UPGRADE.md

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
driesvints and taylorotwell authored Feb 8, 2022
1 parent 05555e4 commit c1245b1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you were depending on functionality from `nexmo/laravel` you may now use it d
```php
use Vonage\Client;

$vonageClient = app()->make(Client::class);
$vonageClient = app(Client::class);
```

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

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

### Notification Channel Name

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`:

```php
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return $notifiable->prefers_sms ? ['vonage'] : ['mail', 'database'];
}
```

In addition, any ad-hoc notifications that were previously routing via `nexmo` should have their routing updated to `vonage`:

```php
Notification::route('vonage', '5555555555')->notify(new InvoicePaid($invoice));
```

### Class / Method Renaming

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

0 comments on commit c1245b1

Please sign in to comment.