dginxreal/laravel-maintenance
Laravel package for putting your app into maintenance mode with customizable responses and exclusions. Helps show a friendly maintenance page, allow certain IPs or routes, and quickly toggle maintenance on/off during deployments or upgrades.
DGINXREAL\Maintenance), adhering to Laravel’s conventions. This aligns well with projects prioritizing clean separation between core business logic and operational features like maintenance modes.config/maintenance.php) and hooks (e.g., middleware events), allowing TPMs to extend functionality (e.g., adding analytics during maintenance) without forking the package.staging vs. production)? Does the package support environment-specific configurations?503 status vs. custom JSON)?spatie/laravel-maintenance-mode (more popular, actively maintained)? What are the trade-offs?MaintenanceMiddleware) in Laravel’s HTTP kernel. Ensure the project’s middleware stack (e.g., app/Http/Kernel.php) can accommodate this without conflicts.config/maintenance.php file. If the project uses a custom config structure, this may need adjustment.composer require dginxreal/laravel-maintenance.php artisan vendor:publish --tag="maintenance-config".php artisan vendor:publish --tag="maintenance-views".config/maintenance.php to define:
/maintenance).app/Http/Kernel.php if not auto-discovered.php artisan maintenance:enable)./maintenance) don’t clash with existing routes. Use route model binding or middleware to resolve conflicts.config/maintenance.php) may diverge from upstream changes. Document customizations and version them (e.g., via Git).composer why-not to test upgrade paths.maintenance:disable during traffic spikes.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Maintenance mode enabled accidentally | Users see maintenance page during normal operation | Implement confirmation steps |
How can I help you explore Laravel packages today?