Learn how to hook real-time exception tracking, Gemini AI root-cause analyzers, and interactive Telegram response cards into your Laravel applications from scratch.
Before installing the package, make sure you collect these three keys.
@BotFather (look for the official blue verification checkmark)./newbotbot (e.g., my_app_panic_bot).712345678:AAG...). Copy and save this string.YOUR_BOT_TOKEN with your actual BotFather token:
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
chat":{"id":-100xxxxxxxxxx} property. Copy that chat ID number.Integrate PanicPulse into your fresh Laravel project in seconds.
composer require fortechub/panic-pulse:@dev
This publishes configuration values and sets up your exception pipeline hooks cleanly.
php artisan panic-pulse:install
Paste your collected keys at the very bottom of your Laravel .env file:
PANIC_PAULS_TELEGRAM_BOT_TOKEN=your_bot_token_here
PANIC_PULSE_CHAT_ID=your_chat_id_here
GEMINI_API_KEY=your_gemini_api_key_here
Trigger an exception to confirm your telegram connection is fully operational.
routes/web.phpuse Illuminate\Support\Facades\DB;
Route::get('/test-panic', function () {
// Triggers a strict QueryException handled automatically by PanicPulse
DB::table('non_existent_table_xyz')->get();
});
php artisan config:clear
php artisan cache:clear
Now open http://127.0.0.1:8000/test-panic in your browser. Check your Telegram—your report will arrive instantly!
Avoid these common mistakes to keep your application secure and bug-free.
Do not skip sending a direct start message to your Telegram bot before hooking it up. If you skip this, Telegram throws a 403 Forbidden error.
Do not push your Telegram Bot Token, Chat ID, or Gemini API keys to public code hosting platforms like GitHub.
Never forget to run php artisan config:clear after modifying credentials in your environment file.
Avoid manually guessing core file lines when installing; let the automated php artisan panic-pulse:install handler do the configuration safely.