PHPackages                             gjae/laravel-telegram-log - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. gjae/laravel-telegram-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

gjae/laravel-telegram-log
=========================

0.1.1(6y ago)261MITPHP

Since May 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gjae/laravel-telegram-log)[ Packagist](https://packagist.org/packages/gjae/laravel-telegram-log)[ RSS](/packages/gjae-laravel-telegram-log/feed)WikiDiscussions master Synced 2d ago

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

Installation and setup
======================

[](#installation-and-setup)

#### Installing dependency via composer

[](#installing-dependency-via-composer)

```
composer require gjae/laravel-telegram-log
```

Once you have installed this package, execute the following command at laravel command prompt:

```
php artisan vendor:publish --provider="Gjae\TelegramLogChannel\Providers\TelegramChannelProvider"
```

It will create a file named `config/telegram_channel.php`. It has the basic config. Now you will need to add a "chat ID" and a "bot api token" in this file.

Quickstarter with telegram bots
===============================

[](#quickstarter-with-telegram-bots)

Creation of new bots is managed by the BotFather.

Search **[@BotFather](https://t.me/BotFather)** on telegram or click here: **[botfhater](https://t.me/BotFather)**.

Now, create a new bot by typing the command **/newbot** into the BotFather chat box or choose it by clicking on the square button at the rigth corner of the chat box. Then, select "/newbot". The name of your new bot must have the suffix "Bot", for example:**"laravel\_log\_bot", "LaravelBot"**. The BotFather will ask you for a name and a username for your new bot (both of them must have the suffix "Bot").

finally, the **[@BotFather](https://t.me/BotFather)** will send you a message like this:

> > Done! Congratulations on your new bot. You will find it at **t.me/\[YourUsernameBot\]**. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this. Use this token to access the HTTP API: **\[TOKEN\]**Keep your token secure and store it safely, it can be used by anyone to control your bot. For a description of the Bot API, see this page:

GREAT, you have already created your first **telegram bot**.

Next, copy the token (the one that has the format XXXX:YYYYYYYY) and save it in a safe place.

Usage
=====

[](#usage)

Open your ".env file" and look for the following lines and paste the Token and Telegram Id (the ones you had copied before) as values for the following variables:

1. **TELEGRAM\_BOT\_ACCESS\_TOKEN=** paste here your **SECRET BOT API TOKEN** .,
2. **TELEGRAM\_CHAT\_ID=** paste here your chat ID

> > NOTE 1: Sometimes the ID value may have a "-" mark at the beginning; you should copy this symbol too.

> > NOTE 2: IF THE ID VALUE HAS ANY SYMBOL AT THE BEGINING, PUT THE ID VALUE INSIDE QUOTATION MARKS. Example: "-121412312"

next open the **config/logging.php** file, look for the "channels" array and overwrite it like this:

```
[
    ...
    'channels' => [
        'stack' => [
            'driver' => 'stack',
            'channels' => ['telegram', 'daily'],
        ],

        'telegram'  =>[
            'driver'  => 'monolog',
            'handler' => \Gjae\TelegramLogChannel\TelegramChannel::class,
            'level'   => 'error'
        ],

        ...
    ]
]
```

How to get the chat\_id value
=============================

[](#how-to-get-the-chat_id-value)

You can make a request to the url: **\[[https://api.telegram.org/bot\[YourBotAccessToken\]/getUpdates](https://api.telegram.org/bot[YourBotAccessToken]/getUpdates)\] ([https://api.telegram.org/bot\[YourBotAccessToken\]/getUpdates](https://api.telegram.org/bot%5BYourBotAccessToken%5D/getUpdates))** (change \[YourBotAccessToken\] by the "bot token" you have just gotten). Now you'll get a json like this:

```
{
    "ok": true,
    "result": [
        {
            "update_id": 193532624,
            "message": {
                "message_id": 2,
                "from": {
                    "id": 259222478,
                    "is_bot": false,
                    "first_name": ....,
                    "last_name": ...,
                    "username": ...,
                    "language_code": ...
                },
                "chat": {
                    "id": 259222478,
                    "first_name": ....,
                    "last_name": ...,
                    "username": ...,
                    "type": "private"
                },
                "date": 1589138780,
                "text": "@channelusername",
                "entities": [
                    {
                        "offset": 0,
                        "length": 16,
                        "type": "mention"
                    }
                ]
            }
        },
    ]
}
```

YOU'RE DONE!
============

[](#youre-done)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

2191d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28078695?v=4)[Giovanny Avila](/maintainers/gjae)[@gjae](https://github.com/gjae)

---

Top Contributors

[![Yo-hanaPR](https://avatars.githubusercontent.com/u/66914983?v=4)](https://github.com/Yo-hanaPR "Yo-hanaPR (5 commits)")[![gjae](https://avatars.githubusercontent.com/u/28078695?v=4)](https://github.com/gjae "gjae (1 commits)")

---

Tags

api-botbotfatherlaravelloggingtelegram-bots

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gjae-laravel-telegram-log/health.svg)

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

###  Alternatives

[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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