PHP code example of kodeops / laravel-telegram-wrapper

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

    

kodeops / laravel-telegram-wrapper example snippets


use kodeops\LaravelTelegramWrapper\Telegram;

$keyboard = [
    'inline_keyboard' => [
        [
            [
                'text' => 'Text Button',
                'url' => 'https://tannhauser-gate.xyz',
            ],
        ]
    ]
];

$markdown = 'A simple *markdown* text';
$image = 'https://iibusiness.s3.eu-central-1.amazonaws.com/tannhauser/favicon.jpg';

return (new Telegram())
    ->withKeyboard($keyboard)
    ->withMarkdownCaption($markdown)
    ->sendPhoto($image);