hmdev1/lern
LERN records Laravel exceptions to your database and sends notifications via Monolog channels like email, Slack, Pushover, SMS (Twilio/Plivo), Sentry, and more. Helps capture request/user context for faster debugging across Laravel versions.
Pros:
app/Exceptions/Handler.php) without requiring invasive architectural changes.Cons:
ExceptionModel or third-party integration (e.g., Laravel Nova, AdminLTE) for visualization.method, data, user_id are opt-in), which may require customization for production-grade debugging.Handler.php update).app/Exceptions/Handler.php to integrate with LERN’s handle() method.vendor_tylercd100_lern_exceptions by default), which must be accounted for in backups and migrations.5xx errors).ExceptionModel or adding custom Monolog handlers requires PHP knowledge (e.g., overriding record() or notify() methods).input payloads) be redacted before logging?lern_exceptions table for growth and archiving?LERN::record() in a job (e.g., RecordExceptionJob) to avoid DB bottlenecks.Handler.php, logging libraries, alerting tools).parent::report() with LERN::handle() in Handler.php. Monitor error rates and notification delivery.config/lern.php (e.g., enable user_id, data collection, or custom Monolog handlers).lern version (e.g., 6.x for Laravel 7/8) as per the compatibility table.sentry-php package is installed and configured.composer require tylercd100/lern
php artisan vendor:publish --provider="Tylercd100\LERN\LERNServiceProvider"
# Customize config/lern.php (e.g., table name, notification channels)
php artisan migrate
app/Exceptions/Handler.php to integrate LERN::handle().ExceptionModel or add custom Monolog handlers.throw new Exception("Test")) and verify DB records and notifications.config/lern.php may need updates for new Laravel versions or custom requirements.LERN::setMessage()).lern_exceptions table will grow over time. Plan for:
user_id, status_code).php artisan lern:list --days=7) for CLI access.lern.notify.log_level (e.g., error instead of critical) to avoid noise.input payloads is redacted (e.g., passwords, tokens).lern_exceptions table if exposing via an API.How can I help you explore Laravel packages today?