1. Go to this page and download the library: Download nicolae-soitu/telegram-dump 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/ */
nicolae-soitu / telegram-dump example snippets
use NicolaeSoitu/TelegramDump/TelegramDump;
//...
$var = ['foo'=>'bar'];
TelegramDump::send($var);
// or with parameters
TelegramDump::
// optional user id or chat id
to(120200000030203020)
// optional type of notification
// info ℹ️
// warning ⚠️
// ok ✅
// delete ❌
// or custom (any string/emoji)
-> type('info')
// Notification title
-> title('Title')
// Notification descriotion
-> description('Short description')
// send is
#app/Exceptions/Handler.php
use NicolaeSoitu/TelegramDump/TelegramDump;
// add in reportable
//...
$this->reportable(function (Throwable $e) {
TelegramDump::send($e); // add it here in reportable
});
//...