PHP code example of iqbalatma / laravel-telegram-bot-channel-async

1. Go to this page and download the library: Download iqbalatma/laravel-telegram-bot-channel-async 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/ */

    

iqbalatma / laravel-telegram-bot-channel-async example snippets


"channels" => [
	...,
	"telegram" => [
		"driver" => "custom",
            	"via" => new Iqbalatma\LaravelTelegramBotChannelAsync\TelegramLogger(env('TELEGRAM_APP_KEY'), env('TELEGRAM_CHANNEL'), true),
            	"level" => "debug"
	]
]

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

/*
* Package Service Providers...
*/
Iqbalatma\LaravelTelegramBotChannelAsync\Providers\TelegramBotChannelServiceProvider::class,

use Iqbalatma\LaravelTelegramBotChannelAsync\Log;

Log::debug("This is debug message");
Log::info("This is info message");
Log::notice("This is notice message");
Log::warning("This is warning message");
Log::error("This is error message");
Log::critical("This is critical message");
Log::emergency("This is emergency message", , ["problem" => "Some problem description"]);

php artisan queue:table
php artisan migrate
php artisan queue:work