- PHP 7.3 or higher
- Laragram package ^2.0|^3.0
composer require milly/laralog php artisan vendor:publish --tag=laralog-configAdd the following environment variables to your .env file or set them in the config/laralog.php file
TELEGRAM_BOT_TOKEN=1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ
TELEGRAM_CHAT_ID=-1234567890Laralog::debug(int|string|array|object $message)Laralog::info(int|string|array|object $message)Laralog::warning(int|string|array|object $message)Laralog::error(int|string|array|object $message)
use Milly\Laralog\Laralog;
// call statically
Laralog::debug('This is a debug message');
//call instance
$laralog = new Laralog();
$laralog->info('This is an info message');And you will receive a message in your telegram bot with the debug message like this:

By default, the package is in the development mode, which means that it will send messages only if the APP_ENV is set to local. If you want to send messages in the production mode, you need to set the is_enabled key to true in the config/laralog.php file
return [
'is_enabled' => true,
'telegram_bot_token' => env('TELEGRAM_BOT_TOKEN'),
'telegram_chat_id' => env('TELEGRAM_CHAT_ID'),
];This package is open-sourced software licensed under the MIT license.