PHPackages                             karacweb/kchat-notification-channel - 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. karacweb/kchat-notification-channel

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

karacweb/kchat-notification-channel
===================================

A Laravel Notification Channel for Infomaniak's kChat

1.0.1(2y ago)38MITPHPPHP &gt;=7.3

Since Aug 26Pushed 2y ago3 watchersCompare

[ Source](https://github.com/karacweb/kchat-notification-channel)[ Packagist](https://packagist.org/packages/karacweb/kchat-notification-channel)[ Docs](https://github.com/karacweb/kchat-notification-channel)[ RSS](/packages/karacweb-kchat-notification-channel/feed)WikiDiscussions main Synced 1mo ago

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

Infomaniak's kChat Notifications Channel for Laravel
====================================================

[](#infomaniaks-kchat-notifications-channel-for-laravel)

This package makes it easy to send notifications using [kChat](https://www.infomaniak.com/en/kchat) with Laravel 5.5+, 6.x, 7.x, 8.x, 9.x, 10.x

[![Latest Stable Version](https://camo.githubusercontent.com/ac642acb79203316153cc1caedf2294947a2fde18ef960181f0d51579ef0e5ba/68747470733a2f2f706f7365722e707567782e6f72672f6b617261637765622f6b636861742d6e6f74696669636174696f6e2d6368616e6e656c2f76)](https://packagist.org/packages/karacweb/kchat-notification-channel)[![License](https://camo.githubusercontent.com/38a84c0712182efed27391e75b7e4322db151278134c36ad4bf8cbea35089fdc/68747470733a2f2f706f7365722e707567782e6f72672f6b617261637765622f6b636861742d6e6f74696669636174696f6e2d6368616e6e656c2f6c6963656e7365)](https://packagist.org/packages/karacweb/kchat-notification-channel)[![PHPUnit tests](https://github.com/karacweb/kchat-notification-channel/actions/workflows/tests.yml/badge.svg)](https://github.com/karacweb/kchat-notification-channel/actions/workflows/tests.yml/badge.svg)

This package leverages Infomaniak's public API to send notification to [kChat](https://www.infomaniak.com/en/kchat) channels with Laravel 5.5+, 6.x, 7.x, 8.x, 9.x and 10.x

```
return KChatMessage::create()
    ->to("123456789")
    ->content('The backup of your application succeeded')
    ->commentTo('987654321');
```

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the kChat service](#setting-up-the-kchat-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
    - [Retrieve the kChat channel ID](#retrieve-the-kchat-channel-id)
    - [Use Markdown in the message](#use-markdown-in-the-message)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require karacweb/kchat-notification-channel
```

Next, if you're using Laravel *without* auto-discovery, add the service provider to `config/app.php`:

```
'providers' => [
    // ...
    NotificationChannels\KChat\KChatServiceProvider::class,
],
```

### Setting up the kChat service

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

- [Create a token with the scope `kchat`](https://manager.infomaniak.com/v3/ng/accounts/token/add)
- Retrieve the Url of your kChat instance, it should look like `https://your-team.kchat.infomaniak.com`.
- Paste the token and your kChat base Url in your `config/services.php` file: ```
    // config/services.php
    'infomaniak_kchat' => [
        'token' => 'YOUR_API_TOKEN',
        'base_url' => 'https://your-team.kchat.infomaniak.com'
    ],

    ```

Usage
-----

[](#usage)

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

```
use Illuminate\Notifications\Notification;
use NotificationChannels\KChat\KChatChannel;
use NotificationChannels\KChat\KChatMessage;

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

    public function toKChat($notifiable)
    {
        return KChatMessage::create()
            ->to("123456789")
            ->content('The backup of your application succeeded')
            ->commentTo('987654321'); // A post ID you wish to respond to
    }
}
```

Instead of using the `to($channel_id)` method for specifying the channel ID you can also add the `routeNotificationForKChat` method inside your Notifiable model. This method needs to return the channel ID.

```
public function routeNotificationForKChat(Notification $notification)
{
    return '123456789';
}
```

### Available Message methods

[](#available-message-methods)

- `to(string $channel_id)`: The channel to send the message to.
- `content(string $content)`: Content of the message (Markdown supported).
- `commentTo(string $post_id)`: A post ID you wish to respond to.

### Retrieve the kChat channel ID

[](#retrieve-the-kchat-channel-id)

[![Retrieve the kChat channel ID](docs/retrieve-kchat-channel-id.jpg)](docs/retrieve-kchat-channel-id.jpg)

### Use Markdown in the message

[](#use-markdown-in-the-message)

```
// app/Notifications/InterestingNotification.php
public function toKChat($notifiable)
{
    return KChatMessage::create()
        ->to("123456789")
        ->content(view('notificationTemplate', [
            'variable' => 'ABC',
        ]));
}
```

```
// resources/views/notificationTemplate.blade.php
** ✅ Bold title **

Lorem ipsum *dolor* sit amet, ~~consectetur~~ adipiscing elit...

Variable content {{ $variable }}
```

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)

- [karac web Sàrl](https://karac.ch)

License
-------

[](#license)

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

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

2

Last Release

996d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b70dca4d45fe5f427c2a10810c643723aabe33af789ea9578acfb9de0955e42?d=identicon)[apiaget](/maintainers/apiaget)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/karacweb-kchat-notification-channel/health.svg)

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

###  Alternatives

[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)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[laravel-notification-channels/aws-sns

Amazon Simple Notification Service (AWS SNS) notification channel for Laravel.

541.1M2](/packages/laravel-notification-channels-aws-sns)

PHPackages © 2026

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