1. Go to this page and download the library: Download pyaesone17/lapse 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/ */
php
use NotificationChannels\Telegram\TelegramMessage;
use Pyaesone17\Lapse\ErrorNotifiable;
..
class Handler extends ExceptionHandler
{
use ErrorNotifiable;
...
public function report(Exception $exception)
{
if( app()->environment()!='local' ){ // Remove this line if you want lapse to notify in local environment
$this->sendNotification($exception, $this->getFormatters());
}
}
protected function getFormatters()
{
$formatters = array(
'toTelegram' => function($notifiable) {
return TelegramMessage::create()
->content("*HELLO!* \n One of your invoices has been paid!");
}
);
return $formatters;
}
...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.