Gitter Notifications channel for Laravel

v2.2.0 2020-09-12 05:35 UTC

This package is auto-updated.

Last update: 2024-06-12 13:32:45 UTC


Latest Version on Packagist Software License Build Status StyleCI SensioLabsInsight Quality Score Code Coverage Total Downloads

This package makes it easy to send notifications using with Laravel 5.5+, 6.x & 7.x.



Install this package with Composer:

composer require laravel-notification-channels/gitter

If you're using Laravel 5.x you'll also need to specify a version constraint:

composer require laravel-notification-channels/gitter -v 1.0.1

Setting up the Gitter service

In order to send message to Gitter rooms, you need to obtain Personal Access Token or application token.


You can use the channel in your via() method inside the notification:

use Illuminate\Notifications\Notification;
use NotificationChannels\Gitter\GitterMessage;
use NotificationChannels\Gitter\GitterChannel;

class TaskCompleted extends Notification
    public function via($notifiable)
        return [GitterChannel::class];

    public function toGitter($notifiable)
        return GitterMessage::create("Task #{$notifiable->id} is complete!")
            ->room('room_id') // optional

In order to let your notification know which Gitter room you are targeting, add the routeNotificationForGitter method to your Notifiable model:

public function routeNotificationForGitter()
    return 'room_id';

Available methods

from(): Sets the sender's access token.

room(): Specifies the room id to send the notification to (overridden by routeNotificationForGitter if empty).

content(): Sets a content of the notification message. Supports Github flavoured markdown.


Please see CHANGELOG for more information what has changed recently.


$ composer test


If you discover any security related issues, please email instead of using the issue tracker.


Please see CONTRIBUTING for details.



The MIT License (MIT). Please see License File for more information.