|
4 | 4 | [](LICENSE.md) |
5 | 5 | [](https://packagist.org/packages/laravel-notification-channels/microsoft-teams) |
6 | 6 |
|
7 | | -This package makes it easy to send notifications using [Microsoft Teams](https://products.office.com/en-US/microsoft-teams/group-chat-software) with Laravel 5.5+, 6.x, 7.x, 8.x, 9.x, 10.x and 11.x |
| 7 | +This package makes it easy to send notifications using [Microsoft Teams](https://products.office.com/en-US/microsoft-teams/group-chat-software) with Laravel 5.5+, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x and 12.x |
8 | 8 |
|
9 | 9 | ```php |
10 | 10 | return MicrosoftTeamsMessage::create() |
@@ -129,29 +129,34 @@ Notification::route(MicrosoftTeamsChannel::class,null) |
129 | 129 |
|
130 | 130 |
|
131 | 131 | ### Available Message methods |
132 | | - |
133 | | -- `to(string $webhookUrl)`: Recipient's webhook url. |
134 | | -- `title(string $title)`: Title of the message. |
135 | | -- `summary(string $summary)`: Summary of the message. |
136 | | -- `type(string $type)`: Type which is used as theme color (any valid hex code or one of: primary|secondary|accent|error|info|success|warning). |
137 | | -- `content(string $content)`: Content of the message (Markdown supported). |
138 | | -- `button(string $text, string $url = '', array $params = [])`: Text and url of a button. Wrapper for an potential action. |
139 | | -- `action(string $text, $type = 'OpenUri', array $params = [])`: Text and type for a potential action. Further params can be added depending on the action. For more infos about different types check out [this link](https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#actions). |
140 | | -- `options(array $options, $sectionId = null)`: Add additional options to pass to the message payload object. |
| 132 | +| **Method** | **Description** | |
| 133 | +|------------|-----------------| |
| 134 | +| `to(string $webhookUrl)` | Recipient's webhook url | |
| 135 | +| `title(string $title)` | Title of the message | |
| 136 | +| `summary(string $summary)` | Summary of the message | |
| 137 | +| `type(string $type)` | Type which is used as theme color (any valid hex code or one of: primary|secondary|accent|error|info|success|warning) | |
| 138 | +| `content(string $content)` | Content of the message (Markdown supported) | |
| 139 | +| `button(string $text, string $url = '', array $params = [])` | Text and url of a button. Wrapper for an potential action | |
| 140 | +| `action(string $text, $type = 'OpenUri', array $params = [])` | Text and type for a potential action. Further params can be added depending on the action. For more infos about different types check out [this link](https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#actions). | |
| 141 | +| `options(array $options, $sectionId = null)` | Add additional options to pass to the message payload object | |
141 | 142 |
|
142 | 143 | #### Sections |
143 | 144 | It is possible to define one or many sections inside a message card. The following methods can be used within a section |
144 | | -- `addStartGroupToSection($sectionId = 'standard_section')`: Add a startGroup property which marks the start of a logical group of information. |
145 | | -- `activity(string $activityImage = '', string $activityTitle = '', string $activitySubtitle = '', string $activityText = '', $sectionId = 'standard_section')`: Add an activity to a section. |
146 | | -- `fact(string $name, string $value, $sectionId = 'standard_section')`: Add a fact to a section (Supports Markdown). |
147 | | -- `image(string $imageUri, string $title = '', $sectionId = 'standard_section')`: Add an image to a section. |
148 | | -- `heroImage(string $imageUri, string $title = '', $sectionId = 'standard_section')`: Add a hero image to a section. |
| 145 | +| **Method** | **Description** | |
| 146 | +|------------|-----------------| |
| 147 | +| `addStartGroupToSection($sectionId = 'standard_section')` | Add a startGroup property which marks the start of a logical group of information | |
| 148 | +| `activity(string $activityImage = '', string $activityTitle = '', string $activitySubtitle = '', string $activityText = '', $sectionId = 'standard_section')` | Add an activity to a section | |
| 149 | +| `fact(string $name, string $value, $sectionId = 'standard_section')` | Add a fact to a section (Supports Markdown) | |
| 150 | +| `image(string $imageUri, string $title = '', $sectionId = 'standard_section')` | Add an image to a section | |
| 151 | +| `heroImage(string $imageUri, string $title = '', $sectionId = 'standard_section')` | Add a hero image to a section | |
149 | 152 |
|
150 | 153 | Additionally the title, content, button and action can be also added to a section through the optional `params` value: |
151 | | -- `title(string $title, array $params = ['section' => 'my-section'])`: Title of the message and add it to `my-section`. |
152 | | -- `content(string $content, array $params = ['section' => 'my-section'])`: Content of the message and add it to `my-section` (Markdown supported). |
153 | | -- `button(string $text, string $url = '', array $params = ['section' => 'my-section'])`: Text and url of a button and add it to `my-section`. |
154 | | -- `action(string $text, $type = 'OpenUri', array $params = ['section' => 'my-section'])`: Text and type of an potential action and add it to `my-section`. |
| 154 | +| **Method** | **Description** | |
| 155 | +|------------|-----------------| |
| 156 | +| `title(string $title, array $params = ['section' => 'my-section'])` | Title of the message and add it to `my-section` | |
| 157 | +| `content(string $content, array $params = ['section' => 'my-section'])` | Content of the message and add it to `my-section` (Markdown supported) | |
| 158 | +| `button(string $text, string $url = '', array $params = ['section' => 'my-section'])` | Text and url of a button and add it to `my-section` | |
| 159 | +| `action(string $text, $type = 'OpenUri', array $params = ['section' => 'my-section'])` | Text and type of an potential action and add it to `my-section` | |
155 | 160 |
|
156 | 161 | ## Changelog |
157 | 162 |
|
|
0 commit comments