Downloads
Stars
Version
Package for laravel TLE - Telegram logger errors
Read this in other language: English, Русский, Український
Run composer require command.
composer require alexcodelab/telegram-logger-errors
After updating composer, register the service provider in config\app.php
Telegram\Bot\Laravel\TelegramServiceProvider::class,
TLE\TLEServiceProvider::class
Add then alias TLE adding its facade to the aliases array in the same file:
'Telegram' => Telegram\Bot\Laravel\Facades\Telegram::class,
'TLE' => TLE\Facades\TLEFacade::class
php artisan vendor:publish
Select Provider: Telegram\Bot\Laravel\TelegramServiceProvider
php artisan vendor:publish
Select Tag: tle-config
or
php artisan vendor:publish --provider="TLE\TLEServiceProvider" --tag="tle-config"
'bots' => [
'common' => [
'username' => 'Name bot',
'token' => 'Token bot',
'commands' => [],
],
],
'default' => 'common',
'debug' => false
Need for Telegram SDK
'botname' => ''
Chat ID you can get via chat bot @RawDataBot
'chat_id' => ''
'save_log' => true
'path_save' => 'local'
'disable_exception_telegram' => false
use TLE;
try {
print_r($a);
} catch (\Exception $e) {
TLE::exp($e)->send();
}
use TLE;
try {
print_r($a);
} catch (\Exception $e) {
TLE::exp($e)->info('Field check')->send();
}
use TLE;
try {
print_r($a);
} catch (RequestException $e) {
TLE::guzzle($e)->send();
}
public function report(Exception $exception)
{
\TLE::exp($exception)->send();
parent::report($exception);
}