PHP code example of flashteamdev / laravel-telegram-logging

1. Go to this page and download the library: Download flashteamdev/laravel-telegram-logging library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flashteamdev / laravel-telegram-logging example snippets


'telegram' => [
    'driver' => 'custom',
    'via'    => Logger\TelegramLogger::class,
    'level'  => 'debug',
]

'stack' => [
    'driver' => 'stack',
    'channels' => ['single', 'telegram'],
]

config(['telegram-logger.template'=>'laravel-telegram-logging::custom'])

[
    'channels' => [
        [
            'company' => [
                'driver' => 'custom',
                'via' => TelegramLogger::class,
                'chat_id' => env('TELEGRAM_COMPANY_CHAT_ID'),
                'token' => env('TELEGRAM_COMPANY_BOT_TOKEN'),
                'level' => 'debug'
            ],

            'operations' => [
                'driver' => 'custom',
                'via' => TelegramLogger::class,
                'chat_id' => env('TELEGRAM_OPERATIONS_CHAT_ID'),
                'token' => env('TELEGRAM_OPERATIONS_BOT_TOKEN'),
                'level' => 'debug'
            ]
        ]
    ]
]

'telegram' => [
    'driver' => 'custom',
    'via'    => Logger\TelegramLogger::class,
    'level'  => 'debug',
    'exclude_words' => ['word1', 'word2'],
]

LOG_CHANNEL=telegram

php artisan vendor:publish --provider "Logger\TelegramLoggerServiceProvider"