PHPackages                             mavinoo/telegrambot - 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. mavinoo/telegrambot

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

mavinoo/telegrambot
===================

Telegram Notifications Driver

124PHP

Since Aug 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mavinoo/telegrambot)[ Packagist](https://packagist.org/packages/mavinoo/telegrambot)[ RSS](/packages/mavinoo-telegrambot/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Telegram Notifications Channel Plus for Laravel 5.3 \[WIP\]
===========================================================

[](#telegram-notifications-channel-plus-for-laravel-53-wip)

[![Latest Version on Packagist](https://camo.githubusercontent.com/afb682b1bb332a5f8fa641ef9470ba991732060c4d2af1c8d7a7b6f13fe96108/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f74656c656772616d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mavinoo/telegrambot)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/b97405d220266e0f8766f9561658b1e260cfecf550e5881eda74741302b6e589/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6176696e6f6f2f74656c656772616d626f742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mavinoo/telegrambot)

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

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up your Telegram bot](#setting-up-your-telegram-bot)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require mavinoo/telegrambot:dev-master

```

You must install the service provider:

```
// config/app.php
'providers' => [
    ...
    NotificationChannelsPlus\Telegrambot\TelegrambotServiceProvider::class,
],
```

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-bot-api' => [
    'token' => env('TELEGRAM_BOT_TOKEN', 'YOUR BOT TOKEN HERE')
],
...
```

Usage sendMessage
-----------------

[](#usage-sendmessage)

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

```
use NotificationChannelsPlus\Telegrambot\TelegramChannel;
use NotificationChannelsPlus\Telegrambot\TelegramMessage;
use Illuminate\Notifications\Notification;

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

    public function toTelegram($notifiable)
    {
        $url = url('/invoice/' . $this->invoice->id);

        $tg = TelegramMessage::create()
		    ->to($this->user->telegram_user_id)
		    ->content("*HELLO!* \n One of your invoices has been paid!")
		    ->button('View Invoice', $url)
		    ->getResult();
	return $tg;
    }
}
```

Usage sendPhoto
---------------

[](#usage-sendphoto)

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

```
use NotificationChannelsPlus\Telegrambot\TelegramChannel;
use NotificationChannelsPlus\Telegrambot\TelegramMessage;
use Illuminate\Notifications\Notification;

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

    public function toTelegram($notifiable)
    {
        $url = url('/invoice/' . $this->invoice->id);

        $tg = TelegramMessage::create()
		    ->to($this->user->telegram_user_id)
		    ->sendPhoto([
			'caption'   =>  'Hello Mohammad',
			'photo'     =>  'http://www.ilovegenerator.com/large/i-love-mohamed-132309992962.png',
		    ])
		    ->button('View Invoice', $url)
		    ->getResult();

	return $tg;
    }
}
```

Alternatives
------------

[](#alternatives)

For advance usage, please consider using [telegram-bot-sdk](https://github.com/irazasyed/telegram-bot-sdk) instead.

License
-------

[](#license)

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

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16878523?v=4)[Mohammad Ghanbari](/maintainers/mavinoo)[@mavinoo](https://github.com/mavinoo)

---

Top Contributors

[![mavinoo](https://avatars.githubusercontent.com/u/16878523?v=4)](https://github.com/mavinoo "mavinoo (25 commits)")

### Embed Badge

![Health badge](/badges/mavinoo-telegrambot/health.svg)

```
[![Health](https://phpackages.com/badges/mavinoo-telegrambot/health.svg)](https://phpackages.com/packages/mavinoo-telegrambot)
```

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2742.1M5](/packages/mattketmo-email-checker)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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