PHPackages                             ohffs/laravel-msteams-alerts - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. ohffs/laravel-msteams-alerts

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ohffs/laravel-msteams-alerts
============================

Send a message to MS Teams

1.3.0(1y ago)1306MITPHPPHP ^8.0

Since Jan 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ohnotnow/laravel-msteams-alerts)[ Packagist](https://packagist.org/packages/ohffs/laravel-msteams-alerts)[ Docs](https://github.com/ohnotnow/laravel-msteams-alerts)[ RSS](/packages/ohffs-laravel-msteams-alerts/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (12)Versions (14)Used By (0)

Quickly send a message to MS Teams
==================================

[](#quickly-send-a-message-to-ms-teams)

This package can quickly send alerts to Microsoft Teams. You can use this to notify yourself of any noteworthy events happening in your Laravel app. This is a fork of Spatie's [laravel-slack-alerts](https://github.com/spatie/laravel-slack-alerts) so all thanks to them for doing the main bulk of the work. I've pretty much just changed 'Slack' to 'MSTeams'.

```
use Ohffs\MSTeamsAlerts\Facades\MSTeamsAlert;

MSTeamsAlert::message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

Under the hood, a job is used to communicate with MS Teams. This prevents your app from failing in case Teams is down.

Want to send alerts to Discord or Slack instead? Check out [laravel-discord-alerts](https://github.com/spatie/laravel-discord-alerts) and [laravel-slack-alerts](https://github.com/spatie/laravel-slack-alerts).

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

[](#installation)

You can install the package via composer:

```
composer require ohffs/laravel-msteams-alerts
```

You can set a `MSTEAMS_ALERT_WEBHOOK` env variable containing a valid Teams webhook URL. You can learn how to get a webhook URL [in the Teams docs](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook).

Alternatively, you can publish the config file with:

```
php artisan vendor:publish --tag="msteams-alerts-config"
```

This is the contents of the published config file:

```
return [
    /*
     * The webhook URLs that we'll use to send a message to Teams.
     */
    'webhook_urls' => [
        'default' => env('MSTEAMS_ALERT_WEBHOOK'),
    ],

    /*
     * This job will send the message to Teams. You can extend this
     * job to set timeouts, retries, etc...
     */
    'job' => Ohffs\MSTeamsAlerts\Jobs\SendToMSTeamsChannelJob::class,
];
```

Usage
-----

[](#usage)

To send a message to Teams, simply call `MSTeamsAlert::message()` and pass it any message you want.

```
MSTeamsAlert::message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

Using multiple webhooks
-----------------------

[](#using-multiple-webhooks)

You can also use an alternative webhook, by specify extra ones in the config file.

```
// in config/msteams-alerts.php

'webhook_urls' => [
    'default' => 'https://hooks.office.com/services/XXXXXX',
    'marketing' => 'https://hooks.office.com/services/YYYYYY',
],
```

The webhook to be used can be chosen using the `to` function.

```
use Ohffs\MSTeamsAlerts\Facades\MSTeamsAlert;

MSTeamsAlert::to('marketing')->message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

### Using a custom webhooks

[](#using-a-custom-webhooks)

The `to` function also supports custom webhook urls.

```
use Ohffs\MSTeamsAlerts\Facades\MSTeamsAlert;

MSTeamsAlert::to('https://custom-url.com')->message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- Ohffs
- [Niels Vanpachtenbeke](https://github.com/Nielsvanpach)
- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance40

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~94 days

Recently: every ~269 days

Total

13

Last Release

508d ago

Major Versions

0.0.4 → 1.0.02022-01-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/5472be37b2cbedfa6c905bb674cb5780378cf2adcfc47befe01ad7bb4d14f734?d=identicon)[ohnotnow](/maintainers/ohnotnow)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (46 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (37 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![miclf](https://avatars.githubusercontent.com/u/3188746?v=4)](https://github.com/miclf "miclf (2 commits)")[![ohnotnow](https://avatars.githubusercontent.com/u/6471843?v=4)](https://github.com/ohnotnow "ohnotnow (2 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (1 commits)")

---

Tags

spatielaravelohffslaravel-msteams-alerts

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/ohffs-laravel-msteams-alerts/health.svg)

```
[![Health](https://phpackages.com/badges/ohffs-laravel-msteams-alerts/health.svg)](https://phpackages.com/packages/ohffs-laravel-msteams-alerts)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24857.5k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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