PHP code example of nwservices / laravel-telegram-logger

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

    

nwservices / laravel-telegram-logger example snippets


use Illuminate\Support\Facades\Schedule;

Schedule::command('telegram:monitor-log')
    ->everyMinute()
    ->withoutOverlapping()
    ->runInBackground();

protected function schedule(Schedule $schedule): void
{
    $schedule->command('telegram:monitor-log')
        ->everyMinute()
        ->withoutOverlapping()
        ->runInBackground();
}
bash
php artisan vendor:publish --tag=telegram-logger-config

🚨 ERROR

Project: My Laravel App
Environment: production
Time: 2025-01-15 14:30:45

Message:
SQLSTATE[HY000] [2002] Connection refused
#0 /var/www/app/Database/Connection.php(42): PDO->__construct()
#1 /var/www/app/Database/Manager.php(123): Connection->connect()
...

Context:
{
    "environment": "production"
}