PHP code example of michelmelo / laravel-telegram-event-output

1. Go to this page and download the library: Download michelmelo/laravel-telegram-event-output 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/ */

    

michelmelo / laravel-telegram-event-output example snippets


Telegram\Bot\Laravel\TelegramServiceProvider::class

'Telegram'  => Telegram\Bot\Laravel\Facades\Telegram::class

use \AlbertoBottarini\LaravelTelegramEventOutput\TelegramConsoleKernel;

$telegramChatId = 1234567890;
$schedule->command('inspire')->cron('* * * * *')
    ->sendOutputTo(storage_path('logs/test.log'))
    ->telegramOutputTo($telegramChatId);
shell
php artisan vendor:publish --provider=irazasyed/telegram-bot-sdk