PHPackages                             kroyeeg/laravel-teams-logging - 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. kroyeeg/laravel-teams-logging

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

kroyeeg/laravel-teams-logging
=============================

Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector

v2.2.1(4y ago)12.1k1MITPHPPHP ^7.1|^8.0

Since Oct 25Pushed 10mo agoCompare

[ Source](https://github.com/kroyeeg/laravel-teams-logging)[ Packagist](https://packagist.org/packages/kroyeeg/laravel-teams-logging)[ RSS](/packages/kroyeeg-laravel-teams-logging/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (16)Used By (0)

laravel-teams-logging
=====================

[](#laravel-teams-logging)

Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector.

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

[](#installation)

Require this package with composer.

```
$ composer require kroyeeg/laravel-teams-logging
```

Integration
-----------

[](#integration)

Package tested and worked with Laravel and Lumen framework (5.7+).

**Laravel**: After installation using composer finishes up, you'll have to add the following line to your `config/app.php`:

```
Kroyeeg\LaravelTeamsLogging\LoggerServiceProvider::class
```

**Lumen**: For Lumen, you'll have to add the following line to your `bootstrap/app.php`:

```
$app->register(Kroyeeg\LaravelTeamsLogging\LoggerServiceProvider::class);
```

**Laravel**: Then copy `teams` config file from laravel-teams-logging to your config folder:

```
$ php artisan vendor:publish --provider="Kroyeeg\LaravelTeamsLogging\LoggerServiceProvider"
```

**Lumen**: For Lumen, you need to copy file manually to your config folder and enable it in `bootstrap/app.php`:

```
$app->configure('teams');
```

Create a [custom channel](https://laravel.com/docs/master/logging#creating-custom-channels) using laravel logging file or create new logging config file for lumen.

Add this configuration to `config/logging.php` file

```
'teams' => [
    'driver'    => 'custom',
    'via'       => \Kroyeeg\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
],
```

or simply add name to specify different project name for each connector.

```
'teams' => [
    'driver'    => 'custom',
    'via'       => \Kroyeeg\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
    'name'      => 'Dummy Project'
],
```

There are 2 available styles for microsoft teams message, using simple and card. You can see card style in results style which is difference from simple style.

After added configs to your `config/logging.php` file, add `INCOMING_WEBHOOK_URL` variable to your `.env` file with connector url from your microsoft teams connector. Please read [microsoft teams](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors/connectors-using) document to find your connector url.

Usage
-----

[](#usage)

To send a simple error message to teams channel, you kindly use script below:

```
Log::channel('teams')->error('Error message');
```

Or you can include additional info to card message using log context.

```
Log::channel('teams')->error('Error message', [
    'Assigned to' => 'Unassigned',
    'stack trace' => $e->getTraceAsString(), // could not set getTrace(), because may be upper limit fact value's section
    'nested array' => [ // output json_encode string
        'key1' => 'value1',
        'key2' => 'value2',
    ],
]);
```

When using simple style, log context will ignore from message.

You can also add `teams` to the default `stack` channel so all errors are automatically send to the `teams` channel.

```
'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'teams'],
    ],
],
```

If you don't want to use avatars, set avatars in config/teams.php like this:

```
'avatars' => [
    'emergency' => '',
    'alert'     => '',
    'critical'  => '',
    'error'     => '',
    'warning'   => '',
    'notice'    => '',
    'info'      => '',
    'debug'     => '',
],
```

Results
-------

[](#results)

Here are some results of notifications sent to microsoft teams channel using card style.

License
-------

[](#license)

This laravel-teams-logging package is available under the MIT license. See the LICENSE file for more info.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity74

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

Recently: every ~174 days

Total

14

Last Release

1602d ago

Major Versions

v0.1.1 → v1.0.02018-10-25

v1.2.0 → v2.0.02020-01-27

PHP version history (3 changes)v0.1.0PHP ^7.0

v2.0.1PHP ^7.1

v2.2.0PHP ^7.1|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd7203cc69079f1e17ee943e53b5580558eb4cd60da09bb2ae5983fb033ebaa9?d=identicon)[sh-ogawa](/maintainers/sh-ogawa)

---

Top Contributors

[![sh-ogawa](https://avatars.githubusercontent.com/u/9303287?v=4)](https://github.com/sh-ogawa "sh-ogawa (12 commits)")[![stampubolon](https://avatars.githubusercontent.com/u/37098202?v=4)](https://github.com/stampubolon "stampubolon (10 commits)")[![margatampu](https://avatars.githubusercontent.com/u/3712334?v=4)](https://github.com/margatampu "margatampu (9 commits)")[![jetbrains-junie[bot]](https://avatars.githubusercontent.com/in/1164761?v=4)](https://github.com/jetbrains-junie[bot] "jetbrains-junie[bot] (3 commits)")

### Embed Badge

![Health badge](/badges/kroyeeg-laravel-teams-logging/health.svg)

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

PHPackages © 2026

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