Skip to content

Commit e5de10f

Browse files
author
Tobias Madner
committed
rename teams to microsoftTeams in service provider and all further occurences closes
1 parent e85a387 commit e5de10f

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `microsoft-teams` will be documented in this file
44

5+
## 1.1.0 - 2021-01-05
6+
Changed registered notification driver from 'teams' to 'microsoftTeams' to be consistent. Current Release now accepts both names.
7+
Please use 'microsoftTeams' for all calls since 'teams' will be removed with the next major release.
8+
59
## 1.0.1 - 2020-04-27
610

711
### Breaking Change

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This package makes it easy to send notifications using [Microsoft Teams](https:/
1212

1313
```php
1414
return MicrosoftTeamsMessage::create()
15-
->to(config('services.teams.sales_url'))
15+
->to(config('services.microsoft_teams.sales_url'))
1616
->type('success')
1717
->title('Subscription Created')
1818
->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
@@ -63,7 +63,7 @@ Add the following code to your `config/services.php`:
6363
```php
6464
// config/services.php
6565
...
66-
'teams' => [
66+
'microsoft_teams' => [
6767
'webhook_url' => env('TEAMS_WEBHOOK_URL'),
6868
],
6969
...
@@ -74,7 +74,7 @@ You can also add multiple webhooks if you have multiple teams or channels, it's
7474
```php
7575
// config/services.php
7676
...
77-
'teams' => [
77+
'microsoft_teams' => [
7878
'sales_url' => env('TEAMS_SALES_WEBHOOK_URL'),
7979
'dev_url' => env('TEAMS_DEV_WEBHOOK_URL'),
8080
],
@@ -99,7 +99,7 @@ class SubscriptionCreated extends Notification
9999
public function toMicrosoftTeams($notifiable)
100100
{
101101
return MicrosoftTeamsMessage::create()
102-
->to(config('services.teams.sales_url'))
102+
->to(config('services.microsoft_teams.sales_url'))
103103
->type('success')
104104
->title('Subscription Created')
105105
->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
@@ -113,7 +113,7 @@ Instead of adding the `to($url)` method for the recipient you can also add the `
113113
```php
114114
public function routeNotificationForMicrosoftTeams(Notification $notification)
115115
{
116-
return config('services.teams.sales_url')
116+
return config('services.microsoft_teams.sales_url')
117117
}
118118
```
119119

src/MicrosoftTeamsServiceProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ public function boot()
3030
*/
3131
public function register()
3232
{
33+
// Info: Name 'teams' is deprecated an will be removed with the next major release
34+
// Please use 'microsoftTeams' for all calls
3335
Notification::extend('teams', static function (Container $app) {
3436
return $app->make(MicrosoftTeamsChannel::class);
3537
});
38+
39+
Notification::extend('microsoftTeams', static function (Container $app) {
40+
return $app->make(MicrosoftTeamsChannel::class);
41+
});
3642
}
3743
}

0 commit comments

Comments
 (0)