PHPackages                             nycu-csit/laravel-mattermost - 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. nycu-csit/laravel-mattermost

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

nycu-csit/laravel-mattermost
============================

Mattermost Notification Channel for Laravel

v0.1.0(6mo ago)0123MITPHPCI passing

Since Oct 23Pushed 6mo agoCompare

[ Source](https://github.com/nycu-csit/laravel-mattermost)[ Packagist](https://packagist.org/packages/nycu-csit/laravel-mattermost)[ RSS](/packages/nycu-csit-laravel-mattermost/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

nycu-csit/laravel-mattermost
============================

[](#nycu-csitlaravel-mattermost)

This package provides the custom Mattermost Notification Channel for Laravel 10+ applications.

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

[](#installation)

Add following lines to your `composer.json`:

```
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/nycu-csit/laravel-mattermost"
    }
],
"require": {
    "nycu-csit/laravel-mattermost": "^0.1.0"
}
```

Usage
-----

[](#usage)

1. Add Mattermost config in the `services.php`

    ```
    // services.php
    'mattermost' => [
        'webhook_url' => env('MATTERMOST_WEBHOOK_URL'),
    ],
    ```
2. Use `MattermostChannel` in `via` method, and define `toMattermost` method which should return an instance of `MattermostMessage`. You can return falsy value from that method to not send the message to Mattermost.

    ```
