tishmalo/escalation-matrix
Composer 安装命令:
composer require tishmalo/escalation-matrix
包简介
Escalation Matrix Package for Laravel
关键字:
README 文档
README
A robust error handling and escalation system for Laravel applications. This package captures exceptions, prioritizes them, and sends notifications via Email and SMS (optional). It also features a standalone support ticket system via a Driver pattern.
Features
- 🚨 Prioritized Error Handling: Automatically categorizes errors as Critical, High, Medium, or Low.
- 📧 Email Notifications: sends detailed error reports to configured contacts.
- 📱 SMS Alerts: Optional integration with Africa's Talking for critical mobile alerts.
- 🎫 Support Ticket Driver: Plug-and-play interface to connect with any support ticket system.
- 🖥️ Standalone UI: Built-in interface at
/ticketsto view and manage internal tickets. - ⚙️ Configurable: Rate limiting, ignored exceptions, and custom escalation matrices.
Installation
You can install the package via composer:
composer require tishmalo/escalation-matrix
Setup
-
Publish Configuration:
php artisan vendor:publish --tag=escalation-config
-
Run Migrations: The package uses a local database ticket system by default. Run migrations to create the required table:
php artisan migrate
-
Configure Escalation Matrix: Edit
config/escalation.phpto set up your notification contacts, priorities, and channels. -
Setup Ticket Authentication (Important!): The
/ticketsinterface is protected and requires authentication. Choose one of the methods below:
Ticket Authentication Setup
Option 1: For Apps WITH Laravel Authentication (Recommended)
If your application has user authentication (Breeze, Jetstream, Sanctum, etc.), configure allowed users:
ESCALATION_AUTH_ENABLED=true ESCALATION_ALLOWED_EMAILS=admin@company.com,dev@company.com,support@company.com
Or use roles (works with Spatie Permission, Laravel's built-in roles, etc.):
ESCALATION_AUTH_ENABLED=true ESCALATION_ALLOWED_ROLES=admin,developer,support
How it works:
- Users must log in to your application first
- Package checks if the logged-in user's email is in allowed list OR has an allowed role
- No additional login required - uses your app's existing authentication
Option 2: For Apps WITHOUT Authentication (Password-Based)
If your application doesn't have authentication, set up a password:
php artisan escalation:set-password
This command will:
- Prompt you to enter a password (min 8 characters)
- Generate a bcrypt hash
- Show you what to add to your
.envfile
Add the generated hash to .env:
ESCALATION_AUTH_ENABLED=true ESCALATION_PASSWORD_HASH="$2y$10$abc...xyz"
How it works:
- Users visit
/ticketsand see a login form - They enter the password you set
- Session-based authentication (login once per browser session)
- To change password, run
php artisan escalation:set-passwordagain
Disable Authentication (Not Recommended for Production)
To disable authentication (only for local development):
ESCALATION_AUTH_ENABLED=false
⚠️ Warning: This exposes sensitive error data (stack traces, user info, IPs) to anyone who can access your application.
Custom Support Ticket Driver (Optional)
By default, the package uses LocalTicketDriver which stores tickets in your database. To integrate with an external ticketing system:
-
Implement the Driver Interface:
// app/Services/MyTicketDriver.php use Tishmalo\EscalationMatrix\Contracts\SupportTicketDriver; class MyTicketDriver implements SupportTicketDriver { public function createTicket($subject, $description, $priority, $errorData): ?string { // Your integration logic (e.g., Zendesk, Jira, etc.) return 'TICKET-123'; } public function getSystemUser(): ?object { return null; } }
-
Bind Your Custom Driver: In your
AppServiceProvider:$this->app->bind( \Tishmalo\EscalationMatrix\Contracts\SupportTicketDriver::class, \App\Services\MyTicketDriver::class );
Usage
✨ Automatic Exception Capture (Zero Configuration Required)
The package works automatically! Once installed and configured, it will capture and process ALL exceptions without any code changes.
The package automatically registers with Laravel's exception handler using the reportable() method and processes exceptions based on your config/escalation.php settings.
To disable automatic reporting:
# In your .env file ERROR_AUTO_REPORT=false
Or in config/escalation.php:
'auto_report' => false,
Manual Integration (Optional)
If you prefer manual control or disabled auto-reporting, you can manually trigger the escalation:
Using Facade:
use Tishmalo\EscalationMatrix\Facades\Escalation; try { // ... your code } catch (\Throwable $e) { Escalation::handle($e); throw $e; // Re-throw if needed }
Using Service Container:
app(\Tishmalo\EscalationMatrix\Services\EscalationService::class)->handle($exception);
Viewing and Managing Tickets
Access the ticket management interface at /tickets to:
- View all tickets with their priorities and statuses
- Click on individual tickets to see full details
- Change ticket status via dropdown (Open, In Progress, Resolved, Closed)
Updating the Package
When updating the package, if you have previously published the views, republish them to get the latest updates:
php artisan vendor:publish --tag=escalation-views --force
License
The MIT License (MIT). Please see License File for more information.
tishmalo/escalation-matrix 适用场景与选型建议
tishmalo/escalation-matrix 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「notifications」 「laravel」 「error-handling」 「exception-handler」 「error-monitoring」 「support-tickets」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tishmalo/escalation-matrix 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tishmalo/escalation-matrix 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tishmalo/escalation-matrix 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Logging and Notifications for Laravel Console Commands.
A Laravel Nova package that adds a notification feed in your Nova app.
Enables simple 404 Page NotFound handling, also for multilingual sites.
Prevent sensitive exception details from leaking in Laravel applications
a package for handle api errors
Captures outgoing SMS notifications
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 39
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-06