PHPackages                             zanysoft/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. zanysoft/laravel-teams-logging

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

zanysoft/laravel-teams-logging
==============================

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

1.0.3(1mo ago)22↓66.7%MITPHPPHP ^8.1

Since Jul 16Pushed 1mo agoCompare

[ Source](https://github.com/zanysoft/laravel-teams-logging)[ Packagist](https://packagist.org/packages/zanysoft/laravel-teams-logging)[ RSS](/packages/zanysoft-laravel-teams-logging/feed)WikiDiscussions main Synced 1w ago

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

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/7b3545a1f923e73d2543974101d042c6d48306cbebc25add0ba7082570a1b6ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a616e79736f66742f6c61726176656c2d7465616d732d6c6f6767696e672e7376673f7374796c653d666c61742d737175617265)](https://github.com/zanysoft/laravel-teams-logging)[![Version](https://camo.githubusercontent.com/d754c894dc9f544e5fc5fadcfe9677baf00612390d61dff1f33de6eaef47cea2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a616e79736f66742f6c61726176656c2d7465616d732d6c6f6767696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zanysoft/laravel-teams-logging)[![Maintained](https://camo.githubusercontent.com/23b6460aa4cdb1fbb600ff19d28a22f0852541eee0ed66a48ee6338162800cb0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642d7965732d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265266c6162656c3d4d61696e7461696e6564)](https://github.com/zanysoft/laravel-zip/graphs/commit-activity)[![Framwork](https://camo.githubusercontent.com/8f66b78b3bab6bacdba4262944e2a948aeab52d539e0b30e0f145a8e1bc0fabc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4672616d776f726b2d6c61726176656c2d6f72616e67653f7374796c653d666c61742d73717561726526636f6c6f723d463035333430)](https://laravel.com/)

Laravel Teams Logging
=====================

[](#laravel-teams-logging)

A Laravel logging channel that sends application log messages directly to **Microsoft Teams** using an Incoming Webhook.

Features
--------

[](#features)

- Supports Laravel and Lumen
- Supports all Laravel log levels
- Compatible with Laravel's `stack` logging channel
- Two message styles:
    - **Simple** – lightweight notifications
    - **Card** – rich formatted messages with context
- Application/project name (Optional)

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

[](#installation)

Install the package via Composer:

```
composer require zanysoft/laravel-teams-logging
```

### Laravel

[](#laravel)

Register the service provider in `config/app.php` if required:

```
ZanySoft\LaravelTeamsLogging\LoggerServiceProvider::class,
```

Publish the configuration file:

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

### Lumen

[](#lumen)

Register the service provider in `bootstrap/app.php`:

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

Copy the package configuration file to your application's `config` directory, then enable it in `bootstrap/app.php`:

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

Configuration
-------------

[](#configuration)

Create a custom logging channel in `config/logging.php`:

```
'teams' => [
    'driver' => 'custom',
    'via'    => ZanySoft\LaravelTeamsLogging\LoggerChannel::class,
    'level'  => 'debug',
    'url'    => env('TEAMS_WEBHOOK_URL')
],
```

### Environment

[](#environment)

Add folloing details to your `.env` file:

- Message title (default value is APP\_NAME)
- Message style (default simple).
- Microsoft Teams Incoming Webhook URL

```
TEAMS_MESSAGE_TITLE=
TEAMS_MESSAGE_STYLE=simple
TEAMS_WEBHOOK_URL=https://...
```

For instructions on creating an Incoming Webhook, refer to the [Microsoft Teams documentation](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors/connectors-using).

### Message Styles

[](#message-styles)

The package supports two message styles:

**Simple (Default)**

Sends only the log message. (no context)

```
Log::channel('teams')->error('Something went wrong.');
```

**Card**

Displays a rich Teams card containing:

- Log level
- Message
- Timestamp
- Application name
- Additional log context

```
Log::channel('teams')->error(
    'Unable to process payment.',
    [
        'order_id' => 1452,
        'customer' => 'John Doe',
    ]
);
```

Usage
-----

[](#usage)

Log a simple message:

```
Log::channel('teams')->error('Something went wrong.');
```

Log a message with additional context:

```
Log::channel('teams')->error(
    'Unable to process payment.',
     [
        'name'  => 'value',
        'order_id' => 1452,
        'amount'   => 49.99,
     ]
);
```

> **Note:** Log context is only included when using the **card** style.

### Using the Stack Channel

[](#using-the-stack-channel)

To automatically send all application logs to Microsoft Teams, add the `teams` channel to your default logging stack:

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

Screenshots
-----------

[](#screenshots)

Examples of log messages displayed in Microsoft Teams using the **card** style.

### Debug

[](#debug)

[![Debug](assets/debug.png)](assets/debug.png)

### Error

[](#error)

[![Error](assets/error.png)](assets/error.png)

### Warning

[](#warning)

[![Warning](assets/warning.png)](assets/warning.png)

### Critical

[](#critical)

[![Critical](assets/critical.png)](assets/critical.png)

License
-------

[](#license)

This package is open-source software licensed under the **MIT License**.

See the [LICENSE](LICENSE.md) file for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~3 days

Total

3

Last Release

40d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77060551?v=4)[Mubashar Ahmad (مبشر احمد)](/maintainers/mubasharahmad)[@MubasharAhmad](https://github.com/MubasharAhmad)

---

Top Contributors

[![mubashar-mtp](https://avatars.githubusercontent.com/u/144340553?v=4)](https://github.com/mubashar-mtp "mubashar-mtp (5 commits)")[![zanysoft](https://avatars.githubusercontent.com/u/2682072?v=4)](https://github.com/zanysoft "zanysoft (1 commits)")

---

Tags

laravelloggingmicrosoftTeamsmicrosoft-teamslaravel-loggingexception monitorzanysoft

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.5k](/packages/craftcms-cms)[illuminate/log

The Illuminate Log package.

6426.0M716](/packages/illuminate-log)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45945.2k1](/packages/pressbooks-pressbooks)[naoray/laravel-github-monolog

Log driver to store logs as github issues

10924.7k](/packages/naoray-laravel-github-monolog)[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

13102.4k](/packages/shaffe-laravel-mail-log-channel)[spatie/laravel-flare

Send Laravel errors to Flare

131.8M8](/packages/spatie-laravel-flare)

PHPackages © 2026

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