PHPackages                             dmiseev/laravel-telegram-notification - 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. dmiseev/laravel-telegram-notification

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

dmiseev/laravel-telegram-notification
=====================================

Telegram Notification for Laravel framework

1.0.1(8y ago)31151MITPHPPHP &gt;=7.0

Since Jan 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dmiseev/laravel-telegram-notification)[ Packagist](https://packagist.org/packages/dmiseev/laravel-telegram-notification)[ RSS](/packages/dmiseev-laravel-telegram-notification/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

Telegram Notifications for Laravel 5.6
======================================

[](#telegram-notifications-for-laravel-56)

This package makes it easy to send Telegram notification using [Telegram Bot API](https://core.telegram.org/bots) with Laravel 5.5.

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

[](#installation)

You can install the package via composer:

```
composer require dmiseev/laravel-telegram-notification
```

Setting up your Telegram Bot
----------------------------

[](#setting-up-your-telegram-bot)

Talk to [@BotFather](https://core.telegram.org/bots#6-botfather) and generate a Bot API Token.

Then, configure your Telegram Bot API Token:

```
// config/services.php
...
'telegram' => [
    'token' => env('TELEGRAM_TOKEN', 'YOUR BOT TOKEN HERE')
],
...
```

Usage
-----

[](#usage)

You can now use the channel in your `via()` method inside the Notification class.

```
use Dmiseev\TelegramNotification\TelegramChannel;
use Dmiseev\TelegramNotification\TelegramMessage;
use Illuminate\Notifications\Notification;

class WithdrawCreate extends Notification
{
    /**
     * @var Withdraw
     */
    private $withdraw;

    /**
     * @var User
     */
    private $user;

    /**
     * @param Withdraw $withdraw
     */
    public function __construct(Withdraw $withdraw, User $user)
    {
        $this->withdraw = $withdraw;
        $this->user = $user;
    }

    public function via($notifiable)
    {
        return [TelegramChannel::class];
    }

    public function toTelegram($notifiable)
    {
        return TelegramMessage::create()
            ->to($this->user->telegram_user_id)
            ->content("*HI!* \n One of your withdraws has been created!")
            ->button('View Withdraw', url('/withdraws/' . $this->withdraw->id));
    }
}
```

### Routing a message

[](#routing-a-message)

You can either send the notification by providing with the chat id of the recipient to the `to($chatId)` method like shown in the above example or add a `routeNotificationForTelegram()` method in your notifiable model:

```
...
/**
 * @return int
 */
public function routeNotificationForTelegram()
{
    return $this->telegram_user_id;
}
...
```

### Available Message methods

[](#available-message-methods)

- `to($chatId)`: (integer) Recipient's chat id.
- `content('')`: (string) Notification message, supports markdown. For more information on supported markdown styles, check out these [docs](https://telegram-bot-sdk.readme.io/docs/sendmessage#section-markdown-style).
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want and they'll be placed 2 in a row.
- `options([])`: (array) Allows you to add additional or override `sendMessage` payload (A Telegram Bot API method used to send message internally). For more information on supported parameters, check out these [docs](https://telegram-bot-sdk.readme.io/docs/sendmessage).

Security
--------

[](#security)

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

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3029d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2995b7a6bc0d19ed608aeea0cc46637c10bac1990221786e5c046c131d61240?d=identicon)[dmiseev](/maintainers/dmiseev)

---

Top Contributors

[![dmiseev](https://avatars.githubusercontent.com/u/32021063?v=4)](https://github.com/dmiseev "dmiseev (17 commits)")

---

Tags

bot-apilaravelnotificationstelegram-notificationlaravelnotificationtelegramtelegram notification

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dmiseev-laravel-telegram-notification/health.svg)

```
[![Health](https://phpackages.com/badges/dmiseev-laravel-telegram-notification/health.svg)](https://phpackages.com/packages/dmiseev-laravel-telegram-notification)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[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/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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