PHPackages                             babenkoivan/telegram-notifications - 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. babenkoivan/telegram-notifications

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

babenkoivan/telegram-notifications
==================================

Telegram notifications for Laravel

v1.1.0(4y ago)3847.1k↓38%7[1 issues](https://github.com/babenkoivan/telegram-notifications/issues)MITPHPPHP ^7.3 || ^8.0

Since Feb 23Pushed 4y ago2 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

Telegram Notifications For Laravel
==================================

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

[![Packagist](https://camo.githubusercontent.com/eff6ed67cd00cea952a4578925e149ff689e2f1646756bbf058c56a6e0cf0f91/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626162656e6b6f6976616e2f74656c656772616d2d6e6f74696669636174696f6e732e737667)](https://packagist.org/packages/babenkoivan/telegram-notifications)[![Packagist](https://camo.githubusercontent.com/b6ed9d0938de3fad528cd1084f6e5efca7970935712cb9f55129b9bc00214b8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626162656e6b6f6976616e2f74656c656772616d2d6e6f74696669636174696f6e732e737667)](https://packagist.org/packages/babenkoivan/telegram-notifications)[![license](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667)](https://packagist.org/packages/babenkoivan/telegram-notifications)

The package provides easy way to send [Telegram](https://telegram.org/) notifications to any [notifiable entity](https://laravel.com/docs/5.3/notifications#sending-notifications) in your project. It uses official [Telegram Bot API](https://core.telegram.org/bots/api) to deliver your message directly to a user. You can send any information you want: text, media, location or contact.

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Set up your model](#set-up-your-model)
- [Usage example](#usage-example)
- [Advanced Usage](#advanced-usage)
    - [Single Message](#singlemessage)
        - [TelegramMessage](#telegrammessage)
        - [TelegramPhoto](#telegramphoto)
        - [TelegramAudio](#telegramaudio)
        - [TelegramDocument](#telegramdocument)
        - [TelegramSticker](#telegramsticker)
        - [TelegramVideo](#telegramvideo)
        - [TelegramVoice](#telegramvoice)
        - [TelegramLocation](#telegramlocation)
        - [TelegramVenue](#telegramvenue)
        - [TelegramContact](#telegramcontact)
    - [Message Collection](#message-collection)

Requirements
------------

[](#requirements)

The package has been tested on following configuration:

- PHP version &gt;= 7.3
- Laravel Framework version &gt;= 5.5

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

[](#installation)

To install the package you can use composer:

```
composer require babenkoivan/telegram-notifications

```

If the package discovery is disabled, you need to register the service provider in `config/app.php` file:

```
'providers' => [
    TelegramNotifications\TelegramServiceProvider::class
]
```

To copy the package settings to `config` directory run:

```
php artisan vendor:publish --provider='TelegramNotifications\TelegramServiceProvider'

```

Now you're ready to set up a bot token for your application. If you haven't created a bot you can make new one using [BotFather](https://telegram.me/botfather). For more information, visit [Bots: An introduction for developers](https://core.telegram.org/bots) page.

Let's move on and assume you have a token. You can configure the token either in `.env` file:

```
TELEGRAM_BOT_TOKEN=335237666:FFF45pYTYm9HkKWByaepSpcKAUWMo2uMF_9

```

or in `config/telegram.php` file:

```
