sindor/laravel-error-send-telegram

Laravel handle error and send telegram bot

v1.2.1 2025-01-29 05:07 UTC

This package is auto-updated.

Last update: 2025-06-29 02:18:36 UTC


README

Helpful Tool to handle and send error messages via telegram bot

Installation and usage

1. Install package to your laravel project

composer require sindor/laravel-error-send-telegram

2. Publish files

php artisan vendor:publish --tag=laravel-error

3. Telegram bot config (To access send message your users must have a chat with bot)

.env ERROR_TELEGRAM_BOT_TOKEN="<your-token>"
.env ERROR_TELEGRAM_USERS_IDS=<id1>,<id2>
.env ERROR_TELEGRAM_ENABLED=true

4. You can manually send caught exception: (optional)

use Sindor\LaravelErrorSendTelegram\App\Service\Sender;


try {
    //
} catch (\Throwable $e) {
    Sender::handle($e);
}

Configuration

You can configure

  path: config/laravel-error.php

You can customize stub file(template of message)

  path: stubs/laravel-error/message.stub