8ctopus / lumen-9-maintenance-mode
Define application maintenance mode.
Installs: 1 765
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=8.0.2
- laravel/lumen-framework: ^9.0
Requires (Dev)
- fakerphp/faker: ^1.9.1
- friendsofphp/php-cs-fixer: ^3
- laravel/lumen: ~9.0
- phpunit/phpunit: ^9.5.10
README
php 8.0.2 Lumen 9.x
How to install
composer require 8ctopus/lumen-9-maintenance-mode
How to configure
Add this to your AppServiceProvider or in bootstrap/app.php
$app->register(\oct8pus\MaintenanceMode\Providers\MaintenanceModeServiceProvider::class);
Add the up and down commands in app/console/Kernel.php
protected $commands = [ \oct8pus\MaintenanceMode\Console\Commands\DownCommand::class, \oct8pus\MaintenanceMode\Console\Commands\UpCommand::class ];
Maintenance Mode on
php artisan down
Maintenance Mode off
php artisan up
IP based access
Currently only ipv4 and no ip ranges
Add ALLOWED_IPS in your .env file
ALLOWED_IPS=192.168.1.2,127.0.0.1,136.22.16.0
Features planned:
- IP Ranges
- Dynamic DNS IP Filtering