PHP code example of explorin / tebot

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

    

explorin / tebot example snippets


Explorin\Tebot\TebotServiceProvider::class,

'Tebot' => \Explorin\Tebot\Facades\TebotFacade::class,

return [
    'default' => [
        'name' => env('TEBOT_NAME', 'TEBOT'),
        'url' => env('TEBOT_URL', 'localhost'),
        'key' => env('TEBOT_KEY', null),
    ]
];

$app->configure('tebot');

$app->register(Explorin\Tebot\TebotServiceProvider::class);

    use Explorin\Tebot\Services\Tebot; 

    // Default
    Tebot::alert('Hai, ini adalah pesan alert dari Tebot!');

    // Menggunakan channel
    Tebot::alert('Hai')->channel('nama_channel');

return [
    'default' => [
        'name' => env('TEBOT_NAME', 'TEBOT'),
        'url' => env('TEBOT_URL', 'localhost'),
        'key' => env('TEBOT_KEY', null),
    ],
    'example' => [
        'name' => env('TEBOT_NAME2', 'TEBOT'),
        'url' => env('TEBOT_URL2', 'localhost'),
        'key' => env('TEBOT_KEY2', null),
    ]
];

    // Contoh menggunakan channel default
    Tebot::alert('Hai, ini adalah pesan alert dari Tebot!');

    // Contoh penggunaan channel example
    Tebot::alert('Hai')->channel('example');
bash
php artisan vendor:publish --provider="Explorin\Tebot\TebotServiceProvider"