Skip to content

Commit 8c74a95

Browse files
authored
Merge pull request #15 from laravel-notification-channels/12_inconsistentNames
Rename teams to microsoftTeams
2 parents 208376a + e5de10f commit 8c74a95

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?')
@@ -67,7 +67,7 @@ Add the following code to your `config/services.php`:
6767
```php
6868
// config/services.php
6969
...
70-
'teams' => [
70+
'microsoft_teams' => [
7171
'webhook_url' => env('TEAMS_WEBHOOK_URL'),
7272
],
7373
...
@@ -78,7 +78,7 @@ You can also add multiple webhooks if you have multiple teams or channels, it's
7878
```php
7979
// config/services.php
8080
...
81-
'teams' => [
81+
'microsoft_teams' => [
8282
'sales_url' => env('TEAMS_SALES_WEBHOOK_URL'),
8383
'dev_url' => env('TEAMS_DEV_WEBHOOK_URL'),
8484
],
@@ -103,7 +103,7 @@ class SubscriptionCreated extends Notification
103103
public function toMicrosoftTeams($notifiable)
104104
{
105105
return MicrosoftTeamsMessage::create()
106-
->to(config('services.teams.sales_url'))
106+
->to(config('services.microsoft_teams.sales_url'))
107107
->type('success')
108108
->title('Subscription Created')
109109
->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
@@ -117,7 +117,7 @@ Instead of adding the `to($url)` method for the recipient you can also add the `
117117
```php
118118
public function routeNotificationForMicrosoftTeams(Notification $notification)
119119
{
120-
return config('services.teams.sales_url')
120+
return config('services.microsoft_teams.sales_url')
121121
}
122122
```
123123

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)