Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Add part for channel name changes #55

Merged
merged 2 commits into from
Feb 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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