Looking to hire Laravel developers? Try LaraJobs

laravel-error-send-telegram maintained by sindor

Description
Laravel handle error and send telegram bot
Last update
2025/01/29 06:07 (dev-master)
License
Links
Downloads
4

Comments
comments powered by Disqus

About

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