PHP code example of defstudio / telegraph

1. Go to this page and download the library: Download defstudio/telegraph 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/ */

    

defstudio / telegraph example snippets


Telegraph::message('hello world')
    ->keyboard(Keyboard::make()->buttons([
            Button::make('Delete')->action('delete')->param('id', '42'),
            Button::make('open')->url('https://test.it'),
    ]))->send();

Telegraph::message('this is great')->send();
bash
php artisan vendor:publish --tag="telegraph-migrations"
bash
php artisan migrate
bash
php artisan vendor:publish --tag="telegraph-config"
bash
php artisan vendor:publish --tag="telegraph-translations"