PHPackages                             tob0t/laravel-notification-channel-teams - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tob0t/laravel-notification-channel-teams

Abandoned → [laravel-notification-channels/microsoft-teams](/?search=laravel-notification-channels%2Fmicrosoft-teams)ArchivedLibrary

tob0t/laravel-notification-channel-teams
========================================

A Laravel Notification Channel for Microsoft Teams

v2.0.0(6y ago)0104MITPHPPHP &gt;=7.2

Since Apr 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Tob0t/laravel-notification-channel-teams)[ Packagist](https://packagist.org/packages/tob0t/laravel-notification-channel-teams)[ Docs](https://github.com/Tob0t/laravel-notification-channel-teams)[ RSS](/packages/tob0t-laravel-notification-channel-teams/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Microsoft Teams Notifications Channel for Laravel (Moved)
=========================================================

[](#microsoft-teams-notifications-channel-for-laravel-moved)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9fb4cf91c49772675012b9c8bfd1be53bcf914f47e6a1937ff0c20e8cb86c887/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7465616d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/teams)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/d1bd21edfd79a59ce275012e30ad86435f1c214cd7953bc855a8fe9e74294f4a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7465616d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/teams)[![StyleCI](https://camo.githubusercontent.com/224b4d2056fae35309b697ceaa3bad13273aa6c3b194d68a00f06bcf8d4f30ec/68747470733a2f2f7374796c6563692e696f2f7265706f732f3235353335393632302f736869656c64)](https://styleci.io/repos/255359620)[![SensioLabsInsight](https://camo.githubusercontent.com/7a395d7551140767a9f38f838e0e96b367bae56234402374185cd65ee8d795a1/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f3a73656e73696f5f6c6162735f69642e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/:sensio_labs_id)[![Quality Score](https://camo.githubusercontent.com/c4d37f439a2322a0ec7a20001dee9807e1691aa4432926b42d8661b835d432e1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7465616d732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/teams)[![Code Coverage](https://camo.githubusercontent.com/a091f3175ca6a4fd64d5f8d4cd61a398f9727d313dc1afc3a42f5465e104c876/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7465616d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/teams/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/fc5495df5174d99432855a75c880d2e67e7c5ea1f95d8049c9a8b80bef2cbbb3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7465616d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/teams)

**I am happy to announce that this repo was officially accepted by Laravel Notification Channels and now can be found under . Please do not use this repo anymore, as I will archive this repo soon.**

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 and 7.x

```
return MicrosoftTeamsMessage::create()
    ->to(config('services.teams.sales_url'))
    ->type('success')
    ->title('Subscription Created')
    ->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
    ->button('Check User', 'https://foo.bar/users/123');
```

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Connector](#setting-up-the-Connector)
    - [Setting up the MicrosoftTeams service](#setting-up-the-MicrosoftTeams-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require tob0t/laravel-notification-channel-teams
```

### Setting up the Connector

[](#setting-up-the-connector)

Please check out [this](https://docs.microsoft.com/en-gb/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook#add-an-incoming-webhook-to-a-teams-channel) for setting up and adding a webhook connector to your Team's channel. Basic Markdown is supported, please also check out the [message card reference article](https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#httppost-action) which goes in more detail about the do's and don'ts.

### Setting up the MicrosoftTeams service

[](#setting-up-the-microsoftteams-service)

Then, configure your webhook url:

Add the following code to your `config/services.php`:

```
// config/services.php
...
'teams' => [
    'webhook_url' => env('TEAMS_WEBHOOK_URL'),
],
...
```

You can also add multiple webhooks if you have multiple teams or channels, it's up to you.

```
// config/services.php
...
'teams' => [
    'sales_url' => env('TEAMS_SALES_WEBHOOK_URL'),
    'dev_url' => env('TEAMS_DEV_WEBHOOK_URL'),
],
...
```

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;

class SubscriptionCreated extends Notification
{
    public function via($notifiable)
    {
        return [MicrosoftTeamsChannel::class];
    }

    public function toMicrosoftTeams($notifiable)
    {
        return MicrosoftTeamsMessage::create()
            ->to(config('services.teams.sales_url'))
            ->type('success')
            ->title('Subscription Created')
            ->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
            ->button('Check User', 'https://foo.bar/users/123');
    }
}
```

Instead of adding the `to($url)` method for the recipient you can also add the `routeNotificationForMicrosoftTeams` method inside your Notifiable model. This method needs to return the webhook url.

```
public function routeNotificationForMicrosoftTeams(Notification $notification)
{
    return config('services.teams.sales_url')
}
```

### Available Message methods

[](#available-message-methods)

- `to(string $webhookUrl)`: Recipient's webhook url.
- `title(string $title)`: Title of the message.
- `summary(string $summary)`: Summary of the message.
- `type(string $type)`: Type which is used as theme color (any valid hex code or one of: primary|secondary|accent|error|info|success|warning).
- `content(string $content)`: Content of the message (Markdown supported).
- `button(string $text, string $url = '', array $params = [])`: Text and url of a button. Wrapper for an potential action.
- `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).
- `options(array $options, $sectionId = null)`: Add additional options to pass to the message payload object.

#### Sections

[](#sections)

It is possible to define one or many sections inside a message card. The following methods can be used within a section

- `addStartGroupToSection($sectionId = 'standard_section')`: Add a startGroup property which marks the start of a logical group of information.
- `activity(string $activityImage = '', string $activityTitle = '', string $activitySubtitle = '', string $activityText = '', $sectionId = 'standard_section')`: Add an activity to a section.
- `fact(string $name, string $value, $sectionId = 'standard_section')`: Add a fact to a section (Supports Markdown).
- `image(string $imageUri, string $title = '', $sectionId = 'standard_section')`: Add an image to a section.
- `heroImage(string $imageUri, string $title = '', $sectionId = 'standard_section')`: Add a hero image to a section.

Additionally the title, content, button and action can be also added to a section through the optional `params` value:

- `title(string $title, array $params = ['section' => 'my-section'])`: Title of the message and add it to `my-section`.
- `content(string $content, array $params = ['section' => 'my-section'])`: Content of the message and add it to `my-section` (Markdown supported).
- `button(string $text, string $url = '', array $params = ['section' => 'my-section'])`: Text and url of a button and add it to `my-section`.
- `action(string $text, $type = 'OpenUri', array $params = ['section' => 'my-section'])`: Text and type of an potential action and add it to `my-section`.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Tobias Madner](https://github.com/Tob0t)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

2208d ago

Major Versions

v1.0.1 → v2.0.02020-04-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/dfcefe534c4970582a180039aa3feae3f6bb37d8db6a0e9fe1737a0142ba0b57?d=identicon)[Tob0t](/maintainers/Tob0t)

---

Top Contributors

[![Tob0t](https://avatars.githubusercontent.com/u/18067389?v=4)](https://github.com/Tob0t "Tob0t (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tob0t-laravel-notification-channel-teams/health.svg)

```
[![Health](https://phpackages.com/badges/tob0t-laravel-notification-channel-teams/health.svg)](https://phpackages.com/packages/tob0t-laravel-notification-channel-teams)
```

###  Alternatives

[laravel/slack-notification-channel

Slack Notification Channel for laravel.

89069.7M111](/packages/laravel-slack-notification-channel)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
