PHPackages                             andisiahaan/telegram-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. andisiahaan/telegram-channel

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

andisiahaan/telegram-channel
============================

Simple Laravel Notification Channel for Telegram

1.0.1(6mo ago)00MITPHPPHP ^8.2

Since Dec 22Pushed 6mo agoCompare

[ Source](https://github.com/andisiahaan/telegram-channel)[ Packagist](https://packagist.org/packages/andisiahaan/telegram-channel)[ RSS](/packages/andisiahaan-telegram-channel/feed)WikiDiscussions main Synced today

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

Telegram Notification Channel for Laravel
=========================================

[](#telegram-notification-channel-for-laravel)

Simple Laravel Notification Channel for sending messages via Telegram Bot API.

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

[](#installation)

```
composer require andisiahaan/telegram-channel
```

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=telegram-config
```

Add your Telegram Bot Token to `.env`:

```
TELEGRAM_BOT_TOKEN=your-bot-token-here
```

Usage
-----

[](#usage)

### Add Route to Your Notifiable Model

[](#add-route-to-your-notifiable-model)

```
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForTelegram($notification): ?string
    {
        return $this->telegram_chat_id;
    }
}
```

### Create a Notification

[](#create-a-notification)

```
use Illuminate\Notifications\Notification;
use AndiSiahaan\TelegramChannel\TelegramChannel;
use AndiSiahaan\TelegramChannel\TelegramMessage;

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

    public function toTelegram($notifiable): TelegramMessage
    {
        return TelegramMessage::create()
            ->text("🎉 Your order has been confirmed!")
            ->line("Order ID: {$this->order->id}")
            ->line("Total: {$this->order->total}")
            ->html()
            ->button('View Order', url("/orders/{$this->order->id}"));
    }
}
```

### Send the Notification

[](#send-the-notification)

```
$user->notify(new OrderConfirmation($order));
```

### Send to Specific Chat ID

[](#send-to-specific-chat-id)

```
TelegramMessage::create()
    ->to('123456789') // Specific chat ID
    ->text('Hello World!')
    ->html();
```

Available Methods
-----------------

[](#available-methods)

### TelegramMessage

[](#telegrammessage)

MethodDescription`create($text)`Static factory method`to($chatId)`Set recipient chat ID`text($text)`Set message text`line($text)`Append a new line`html()`Use HTML parse mode`markdown()`Use Markdown parse mode`markdownV2()`Use MarkdownV2 parse mode`disableWebPagePreview()`Disable link preview`disableNotification()`Send silently`replyTo($messageId)`Reply to a message`button($text, $url)`Add URL button`buttons($array)`Add multiple button rowsLicense
-------

[](#license)

MIT License

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance67

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

194d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.0.1PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![andisiahaan](https://avatars.githubusercontent.com/u/103436266?v=4)](https://github.com/andisiahaan "andisiahaan (2 commits)")

---

Tags

laravelnotificationtelegramchannel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andisiahaan-telegram-channel/health.svg)

```
[![Health](https://phpackages.com/badges/andisiahaan-telegram-channel/health.svg)](https://phpackages.com/packages/andisiahaan-telegram-channel)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.8M47](/packages/laravel-notification-channels-telegram)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2401.4M17](/packages/laravel-notification-channels-discord)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[salamwaddah/laravel-mandrill-driver

Mandrill notification channel for Laravel 9, 10, 11, 12, 13

1177.4k](/packages/salamwaddah-laravel-mandrill-driver)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

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

PHPackages © 2026

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